in reply to Comparing two files

If you don't want to roll your own, you could use one of these from cpan: Text::Diff or Test::Files.

Phil