in reply to Checksum for Windows

System independent.....

#!/usr/bin/perl use Digest::MD5 'md5_hex'; undef $/; open F, $ARGV[0] or die "Usage $0 <file>\n$!\n"; binmode F; print md5_hex(<F>); close F;

Update

Added binmode for Win32, Mac as suggested by particle

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re^2: Checksum for Windows
by particle (Vicar) on Jul 21, 2003 at 18:00 UTC

    although i haven't tested, this looks suspiciously like a case where binmode might be necessary.

    as it stands, it can also be written as a one-liner, like

    perl -000 -MDigest::MD5=md5_hex -ne"$\=md5_hex}{print" your_file_here

    note the triple-zero option to undefine the output line seperator.

    ~Particle *accelerates*