The stupid question is the question not asked | |
PerlMonks |
Re: For vs. Whileby Joost (Canon) |
on Dec 05, 2006 at 23:56 UTC ( [id://588006]=note: print w/replies, xml ) | Need Help?? |
Pop and shift without arguments work on the @_ array (in subroutines at least), and modifying arrays update: that is; adding or removing elements - modifying elements is fine while looping through them with for(each) is IIRC not even officially supported. Even though it appears to do more or less what I'd expect.
In short it doesn't work for exactly the reason you mentioned. :-)
In Section
Seekers of Perl Wisdom
|
|