>Dennis Daupert wrote:
>> Hello list,
>>
>> Now that management has moved us off Unix and onto windows....
>>
>> We develop software packages, and use a perl script to generate
>> checksum signatures to validate our packages.
>>
>> On Solaris, we use cksum; on linux, md5sum.
>>
>> What do people use on windows?
Here's what I do. No reading in the entire file. This method is also
portable to any platform.
my $fh = FileHandle->new();
if (! $fh->open("${dir}${file}")) {
warn "$0: $!\n";
next;
}
binmode($fh);
my $buffer;
my $bytesRead;
my $totalbytes = 0;
$md5 = Digest::MD5->new;
while ($bytesRead = $fh->read($buffer, 32768)) {
$md5->add("$buffer");
$totalbytes += $bytesRead;
# print "${totalbytes}\n"
}
print $md5->hexdigest;
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs