in reply to Diff 2 files and print output to file

You have described the *nix comm utility, which requires your 2 input files to first be sorted using sort.

For a Perl solution, searching through Categorized Questions and Answers, it seems the answers to How do I compare the lines in two text file? may be helpful, particularly Algorithm::Diff.

  • Comment on Re: Diff 2 files and print output to file