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


in reply to Re^2: pack and unpack trouble
in thread pack and unpack trouble

hex converts *from* hex to a number.

sprintf '%X', $n will represent a number using hex.