go ahead... be a heretic | |
PerlMonks |
Re^3: Foreach Loopsby Anonymous Monk |
on Mar 16, 2005 at 15:19 UTC ( [id://439977]=note: print w/replies, xml ) | Need Help?? |
Well, if you consider arrays to be circular, if $x == 0, then $arr[$x - 1] is the last element. Which would be just right. Unfortunally, it doesn't work the way. $arr[$#arr + 1] isn't the same as $arr[0].
In Section
Seekers of Perl Wisdom
|
|