good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: foreach only for a section of a listby brx (Pilgrim) |
on May 04, 2012 at 15:19 UTC ( [id://968940]=note: print w/replies, xml ) | Need Help?? |
Another way, with pop and push:
Update: it's useless to keep $last. See the improvement by johngg, in reply.
In Section
Seekers of Perl Wisdom
|
|