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.
In reply to Re: Diff 2 files and print output to file
by toolic
in thread Diff 2 files and print output to file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |