in reply to Re^2: Is there a Perl version of UNIX "cmp" ?
in thread Is there a Perl version of UNIX "cmp" ?

If perl was compiled with the USE_LARGE_FILES flag (which it likely was if your OS handles large files), it will handle large files (see "perl -V" for that info). Still, "cmp" is likely going to be much faster than File::Compare. The only way to tell is to try both on your large files. Coding practices are fine, but they should be guidelines, not absolutes.

Update: quick benchmark on two identical 1GB files on HP-UX - 13.5 secs (cmp) vs. 17.5 seconds (File::Compare). "much faster" is relative it seems :-)

  • Comment on Re^3: Is there a Perl version of UNIX "cmp" ?