Compares the contents of two sources, each of which can be a file or a filehandle. Returns 0 if the sources are equal, 1 if they are unequal, and -1 on error. File::Compare provides two functions.
cmp (file1, file2[, buffsize])
cmp is a synonym for compare. Exported on request.
compare (file1, file2[, buffsize])
Compares file1 to file2. Exported by default. If present, buffsize specifies the size of the buffer to use for the comparison.
Copyright © 2002 O'Reilly & Associates. All rights reserved.