We don't bite newbies here... much | |
PerlMonks |
Re: $[ is under respected.by Anonymous Monk |
on Aug 03, 2005 at 09:05 UTC ( [id://480406]=note: print w/replies, xml ) | Need Help?? |
Does anyone understand this:
If $[ is set to 2, $foo[2] is the first element (foo). It seems that $foo[1] is the last element (quux), which is logical because 1 == $[ - 1. But while 0 == $[ - 2, $foo[0] isn't equal to penultimate element (baz), but it's equal to the first element (foo) - as if $[ doesn't effect an index equal to 0.
In Section
Meditations
|
|