go ahead... be a heretic | |
PerlMonks |
Re: Reducing memory usage while matching log entriesby hv (Prior) |
on Feb 01, 2006 at 18:28 UTC ( [id://527134]=note: print w/replies, xml ) | Need Help?? |
I don't understand why you are using the @lines array at all, and without that your memory requirements go way down. The logic would be something like:
Your existing code is close to that: remove the references to @lines; replace the definition of $count with: change the action for unlocking to: and replace the final foreach (@lines) {print} with:
Hope this helps, Hugo
In Section
Seekers of Perl Wisdom
|
|