my $data = "123456789"; use Digest::CRC qw(crc8); my $crc = crc8($data);