I'm trying to calculate CRC32 check sum of a file to use with this module Mod_zip, I tried to do this with
Have you looked at Digest::CRC? From the documentation: "It contains wrapper functions with the correct parameters for CRC-CCITT, CRC-16, CRC-32 and CRC-64, as well as the CRC used in OpenPGP's ASCII-armored checksum."
use strict; use warnings; use Digest::CRC; my $ctx = Digest::CRC->new( type => 'crc32' ); open my $fh, '<:raw', $ARGV or die $!; $ctx->addfile(*$fh); close $fh; print $ctx->hexdigest, "\n";
perl script.pl inFile
Hope this helps!