good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: array looping with foreachby Roy Johnson (Monsignor) |
on Jan 18, 2008 at 16:20 UTC ( [id://663083]=note: print w/replies, xml ) | Need Help?? |
See this subthread about each for arrays (and my relatively trivial implementation).
The ways you've listed are pretty standard for using for, with the second being somewhat preferred, IMO. Update: if you use method #1, put the increment in a continue block. Caution: Contents may have been coded under pressure.
In Section
Seekers of Perl Wisdom
|
|