in reply to compare 2 files and print to a third

I think your overall structure will depend on what you want to do with the edge cases: key in file 1 but not file 2, or vice versa, and whether the files are in the same order.

You will want to either read one record at a time from both files together (which makes for a slightly messy loop structure) or read both files into one or two hashes, keeping a separate array of the keys if you need to preserve the original order(s).

If you are downvoting this for other than lack of interest, thanks for sending me a message or reply to let me know why so I can do better (or just stay quiet) next time.

  • Comment on Re: compare 2 files and print to a third