File::Compare(3pm)

File::Compare3pm

Compare files or filehandles

Usage

        use File::Compare;
        if (compare("file1","file2") == 0) {
            print "They're equal\n";
        }

Overview

The File::Compare::compare function compares the contents of two sources, each of which can be a file or a file handle. It is exported from File::Compare by default.

File::Compare::cmp is a synonym for File::Compare::compare. It is exported from File::Compare only by request.

Return

File::Compare::compare return 0 if the files are equal, 1 if the files are unequal, or -1 if an error was encountered.

Releases

3 releases since Debian 2.0 (Hamm); the text changed 2 times.

  1. 2.0
  2. 2.1
  3. 2.2

Author

File::Compare was written by Nick Ing-Simmons. Its original documentation was written by Chip Salzenberg.

From perl-5.004-doc 5.004.05-6 in Debian 2.2 (Potato). Also shipped by perl-5.005-doc. Parsed by carta from the page's man source.