laziness, impatience, and hubris | |
PerlMonks |
Re: Out of Memory Error -- Possible Leak?by Moron (Curate) |
on Dec 15, 2005 at 12:19 UTC ( [id://516932]=note: print w/replies, xml ) | Need Help?? |
Although arguably more perlish than for, foreach has the downside of duplicating the entire set in memory before iterating through it. Converting the foreach to a for ( k=0; ...; ) construction would avoid that.
-M Free your mind
In Section
Seekers of Perl Wisdom
|
|