Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: `diff`ing two files (code)

by mdillon (Priest)
on Jul 20, 2001 at 20:38 UTC ( [id://98462]=note: print w/replies, xml ) Need Help??


in reply to `diff`ing two files (code)

since your code snippet doesn't show that you need to actually know what the differences are, just that the files aren't the same, what you're looking for is File::Compare (part of the standard distro, i believe). in a similar vein, you could continue to use an external command and switch to cmp.

use File::Compare; if (compare $file1, $file2) { #fail }

this was discussed earlier in Comparing two files (and a few other times).

if you do need the differences, do a Super Search for Algorithm::Diff (it has been discussed about half a dozen times).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found