SPUG: "diff" utility within Perl (really "cmp" / File::Compare)

David Dyck dcd at tc.fluke.com
Wed Nov 7 18:50:31 CST 2001


On Tue, 6 Nov 2001 at 11:14 -0800, Bob Brockhausen <BBrockha at starbucks.com>...:
wanted to
> ... verify if indeed the two files are identical or not ...

searching for compare in the CPAN database found

Module          File::Compare   (G/GS/GSAR/perl-5.6.1.tar.gz)

Looks like this module is part of the standare perl 5.6.1
distribution.

NAME
       File::Compare - Compare files or filehandles

SYNOPSIS
               use File::Compare;

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

DESCRIPTION
       The File::Compare::compare function compares the contents
       of two sources, each of which can be a file or a file han­
       dle.  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 encoun­
       tered.



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/





More information about the spug-list mailing list