|Keep It Simple, Stupid|
Slice Madnessby japhy (Canon)
|on Nov 09, 2005 at 15:14 UTC||Need Help??|
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 or $array, 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?