in reply to Checksum for Windows

Staight from perldoc -f unpack
  For example, the following computes the same number as the System V sum program:
$checksum = do { local $/; # slurp! unpack("%32C*",<>) % 65535; };

--

flounder

Replies are listed 'Best First'.
Re^2: Checksum for Windows
by cmv (Chaplain) on Oct 05, 2007 at 13:33 UTC
    I actually tried the perldoc unpack checksum script on my mac, and it didn't work...

    Mac users need to be aware that MacOS uses a different (better) algorithm for their sum(1) command. If you want to use the old algorithm, you have to type in the following command:

    cksum -o2 filename