in reply to Is this a bug, or expected behavior?
$a->[ 1.. 4 ] is not valid array slice syntax. You need an @ in there for it to be so:
[0] Perl> $a = [ qw(mary had a little lamb with mint jelly) ];; [0] Perl> $b = [ @{ $a }[ 1 .. 4 ] ];; [0] Perl> print @$b;; had a little lamb
I'm surprised that you didn't get a warning or two along the lines of:
Using an array as a reference is deprecated at ... Argument "" isn't numeric in array element at ...
|
---|