in reply to Re^2: pack and unpack troublein thread pack and unpack trouble
hex converts *from* hex to a number.
sprintf '%X', $n will represent a number using hex.