Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: File comparison

by Jim (Curate)
on Jul 17, 2012 at 21:12 UTC ( #982335=note: print w/ replies, xml ) Need Help??


in reply to Re^2: File comparison
in thread File comparison

You've already determined the root cause of the problem was that you weren't closing the files before you were comparing them. But for future reference, there's the cmp utility.

Believe it or not, there's a special case of two same text files for which diff will report no differences, but cmp will report a difference at the very first byte. Wanna know what it is? :-)

UPDATE:  It's not made explicitly clear in perldoc File::Compare, but this core module implements the Unix cmp(1) functionality in Perl. This is stated in the README file.


Comment on Re^3: File comparison

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://982335]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-11-27 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (178 votes), past polls