Обратное
my $single_byte_str = pack("H2" , $two_hex_digits);
or
my $single_byte_str = pack("C" , hex($two_hex_digits));
or
my $single_byte_str = chr(hex($two_hex_digits));
есть
my $two_hex_digits = unpack("H2" , $single_byte_str);
or
my $two_hex_digits = sprintf("%02x", unpack("C" , $single_byte_str));
or
my $two_hex_digits = sprintf("%02x", ord($single_byte_str));