Sample code for 30+ languages & platforms
Perl

Compute CRC32 of a File

Calculates the CRC32 of a file's contents and returns the 32-bit CRC as a hex string.

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $zipCrc = Chilkat2::ZipCrc->new;
# Use a relative for absolute path to the file..
my $crc = $zipCrc->FileCrc('qa_data/hamlet.xml');
my $hexStr = $zipCrc->ToHex($crc);
print $hexStr, "\n";