http://www.perlmonks.org?node_id=1018827


in reply to Re^2: Printing Last Element of a line using perl memory?
in thread Printing Last Element of a line using perl memory?

You can even get a little fancier if you want:

my $string = "\x15hello"; printf "%#*vx \n", " ", $string; --output:-- 0x15 0x68 0x65 0x6c 0x6c 0x6f

And the printf() actually reveals every character's ord(), so it's not confined to ascii characters.