$_ = unpack("h*", shift); s/([0-9a-f]{2})/$1 /g; print; #### printf("%02x ", $_) for (unpack ("C*", shift));