Disclaimer: I am not a PAUSE admin. On Thu, 14 Mar 2002 00:14:07 -0600, [EMAIL PROTECTED] (Paul Baker) wrote:
> My reason for writing md5sum-perl is that Mac OS X does not ship with a > md5sum binary. After spending an hour or so trying to find source code > for an md5sum binary, I decided to write my own in Perl! It should be fairly trivial to build something like that with Digest::MD5, shouldn't it? I imagine a no-brainer replacement might consist simply of something like #!/usr/bin/perl -w use strict; use Digest::MD5; if(@ARGV) { for my $file (@ARGV) { open FILE, $file or die "Can't open $file: $!"; binmode FILE; print Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n"; close FILE; } } else { print Digest::MD5->new->addfile(*STDIN)->hexdigest, " -\n"; } Cheers, Philip