That is actually not the case.
my @s = $r->[1..3];
In this snippet, 1..3 is not treated as a comma separated expression, resulting in the value 3.
In fact, 1..3 is in scalar context, and so it is the flip-flop operator. Since the left operand is just a constant, there is an implicit comparison to $., which returns false, resulting in the warning:
Argument "" isn't numeric in aelem ...
The interesting thing is that 1..3 in scalar context returns "" for false, rather than the special false value consisting of both "" and 0.
Check out perlop for more on the wacky .. operator. | [reply] [d/l] [select] |