Author image Joseph N. Hall

NAME

File::Cmp - compare files

SYNOPSIS

  use File::Cmp;

  $status = cmp_file "filename1", "filename2";

DESCRIPTION

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.

BUGS

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.

AUTHOR

Joseph N. Hall, joseph@5sigma.com