in reply to hex to bin

$bin = sprintf "%b", oct "0x$hex"; $hex = sprintf "%x", oct "0b$bin";