SPUG: "diff" utility within Perl

Matt Tucker tuck at whistlingfish.net
Wed Nov 7 21:50:26 CST 2001

-- Man Lung Li <manlungl at microsoft.com> spake thusly:

> If you just want to know whether two files are identical, the simplest
> way is to compare their checksum.

In simple cases this is probably true, but not if you're dealing with
extremely large files. Comparing checksums requires reading in the
entire file. Using diff --brief (or similar) will stop reading after
the first difference.

Of course, the methods mentioned already involving the *Diff* modules
required reading in the entire file, although presumably this process
could be altered to read the file in chunks instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20011107/67e57338/attachment.bin

More information about the spug-list mailing list