in reply to Find checksum (Linux) equivalent in Perl windows

The OO interface to Digest::CRC is pretty borken currently. The following should produce correct checksum values, though:

use Digest::CRC; do { my $x = Digest::CRC->new(width=>32, poly=>0x04c11db7, xorout=>~0); undef $/; my $in = <>; my $len = length $in; my $zz = (pack "J<", $len) =~ s/\0*$//r; my $crc = $x->add( $in.$zz )->digest; print "$crc $len $ARGV\n"; } while @ARGV;