I am trying to do something really simple. I am trying to split a string into components. Below is the code within a subroutine.
The code is intended to take a date string in the format
and split it into the parts.
Below is the debugger output for the code.
The first line is what I think should work.
I also tried a variation with the same results.
I have also tried other varients not shown.
The result is the same. I just get a "1" and not a split string.
125: my ($yr,$mth,$dy) = split('-',@_ ,3); # split the components of the input
127: my @z = split('-',@_ ,3); # split the components of the input
DB<1> p @_
DB<2> p $yr
DB<3> p $mth
DB<4> p $dy
128: ($yr,$mth,$dy) = @z;
DB<5> p @z