more useful options | |
PerlMonks |
Re: Inserting an element into an array after a certain elementby Anonymous Monk |
on Apr 01, 2005 at 17:34 UTC ( [id://444243]=note: print w/replies, xml ) | Need Help?? |
splice() is fun. (Pls. to pardon ugly.)
Output: It's not entirely cool; it does take an iterator, which I accept is fairly cheesy, but it does the job in a single foreach() that probably won't even make it to the end of the array.
In Section
Seekers of Perl Wisdom
|
|