Don't ask to ask, just ask | |
PerlMonks |
Re: foreach array - delete current row ?by vsespb (Chaplain) |
on Jun 02, 2013 at 21:46 UTC ( [id://1036625]=note: print w/replies, xml ) | Need Help?? |
delete the current row from an array when looping through it without setting up a counter and splice operationIHMO counter+splice is most feasible way. I use it when copying arrays with grep is too slow.
In Section
Seekers of Perl Wisdom
|
|