in reply to golf anyone? (hexdump)
$_ = unpack("h*", shift); s/([0-9a-f]{2})/$1 /g; print;
Simpler, if not much shorter ; )
Update: Hmm, this'll work too:
printf("%02x ", $_) for (unpack ("C*", shift));
2nd Update: I think I'll be trading in my extra whitespaces for a 'chop;'
|
|---|