in reply to Re^2: Compare 2 csv files using a key set of colums
in thread Compare 2 csv files using a key set of colums

Yes, that's true. However, adding a per-file hash to store the key-line mapping is so trivial that I shouldn't have to mention it. Or, if memory might become an issue, you can reparse each file to find the necessary lines, which is what I would do.

I tend to write memory-efficient solutions when dealing with datafiles because I have dealt with 1G+ xSV datafiles. Just because this file is 20K doesn't mean the next file will be.


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?
  • Comment on Re^3: Compare 2 csv files using a key set of colums