in reply to Perl Code Runs Extremely Slow
- 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
|
|---|