This Perl Tutorial shows how to use the File::Compare module to easily check if two files contents are exactly the same.