#!/bin/perl use strict; use warnings; my $strToSend = "\xfe\x04\x01"; my $CRC16 = GetCRC16($strToSend. "\x00\x00"); # ergibt "BED2" print "Checksum 1: ". sprintf("%X", $CRC16). "\n"; my $strReceived = "\xfe\x04\x01\xbe\xd2"; $CRC16 = GetCRC16($strReceived); # ergibt 0 print "Checksum 2: ". sprintf("%X", $CRC16). "\n"; sub GetCRC16 {    my $s = shift;        my $CRCreg = 0xffff00;        for (my $cp=0; $cp> 8; } 1;