- open and pass through each file only once for the entire run
- explicitly close files
- don't use sort, generally unnecessary except when sorting output
- if either of the files is reused for multiple runs, cache its hash into a Storable instead of passing through it each time.
The other replies already supply examples for some of these points.
-M
Free your mind
In reply to Re: Perl Code Runs Extremely Slow
by Moron
in thread Perl Code Runs Extremely Slow
by garbage777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |