$_ = "This line contains 0xC30x86n exotic character."; s/0x([0-9a-fA-F]{2})/chr(hex($1))/eg; utf8::decode($_);