my $nachricht = '050b46bf' my $bin_data = pack ('H*', $nachricht); my $data = "\x00\x8e\x10\x03\x03\x00\x00\x00". $bin_data ."\xec\x6a\x70\xb7";