more portable perl-based simple_checksum; i think this is correct, but i welcome...