in reply to Out of Memory Error -- Possible Leak?
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