use strict; use warnings; use Digest::CRC; my $string = 0x01e5; my $ctx = Digest::CRC->new(type=>"crc32", poly=>0x2D); $ctx->add($string); print "CRC for '$string' is 0x" . $ctx->hexdigest . "\n";