File::Cmp - compare files
use File::Cmp; $status = cmp_file "filename1", "filename2";
cmp_file() compares the contents of two files. If they are identical cmp_file() return a value of 0. Otherwise it returns a positive nonzero value.
If one of the two files cannot be opened, cmp_file() returns -1.
cmp_file() checks to see if files have identical filenames, but maybe it should also check inode numbers?
It might be nice to have a version that would return the location of the first difference found.
Joseph N. Hall, joseph@5sigma.com
To install File::Cmp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Cmp
CPAN shell
perl -MCPAN -e shell install File::Cmp
For more information on module installation, please visit the detailed CPAN module installation guide.