in reply to Using Digest::CRC to find CRC16 checksum

Just one mistake: your poly is reflected. Try

my $ctx = Digest::CRC->new(width=>16, poly=>0x1021, init=>0xffff, refi +n=>1, refout=>1);