Just another Perl shrine | |
PerlMonks |
Re: Is there a Perl version of UNIX "cmp" ?by samtregar (Abbot) |
on Feb 06, 2009 at 19:22 UTC ( [id://741987]=note: print w/replies, xml ) | Need Help?? |
I agree that there's no compelling reason not to just call it from system() but if you did need it in Perl code it'd be a fun challenge. I think I'd do it by reading in chunks from each file and doing an MD5 on each chunk with Digest::MD5. Compare the MD5s and if they're different then you've got a difference. Oh, and start by comparing file sizes!
-sam
In Section
Seekers of Perl Wisdom
|
|