http://qs321.pair.com?node_id=722994


in reply to how to speed lookups?

What is $linecontainsbuf{$searchfield} = $line for @validbufs; doing? You're also going to have memory issues because you're, essentially, loading both files into RAM.

Best would be to sort the two files on the relevant keys (using an external sort program), then iterate through the filehandles. Remember - once you've seen something in %valid_bufs, you can't see it again.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?