my $recipient = "root"; unless (defined($recipient)) { $recipient = "root" } # useless #### $recipient = "root" unless (defined($recipient)); #### substr($message{detail}, 32, 8) =~ /(\w\w)(\w\w)(\w\w)(\w\w)/; $message{mml} = pack ("CCCC", hex($1), hex($2), hex($3), hex($4)); # simply $message{mml} = pack ("H*", substr($message{detail}, 32, 8));