http://qs1969.pair.com?node_id=507091

Someone on #freenode::perl just asked if $array[2..4] would return a list of elements. Their mistake was the '$' instead of a '@', but I opened a can of worms by saying that the code as shown would return $array[0] or $array[1], but I couldn't know which.

Then I said that $array[2..4] behaves differently from ($x,$y) = (2,4); $array[$x..$y]. Just for kicks, I post this here. Who knows why the two behave differently?

# given: my @array = qw( A B C ); my ($x, $y, $z) = (0, 1, 2); # explain: $array[0..1] $array[0..2] $array[1..2] $array[$x..$y] $array[$x..$z] $array[$y..$z] $array[$z..$x]
Hint here:

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart