my $byte=substr($data,0,2); my $test=sprintf "%02x", $byte; &do_log("Received data: $test");