my $s = "\x{1234}\x{5678}"; # string with utf8 flag on print unpack("H*", $s), "\n"; #### e188b4e599b8 #### 3478
## e188b4e599b8 ##
## 3478