in reply to Output numbers in hex
$hex_num = 3914; print $hex_num; [download]
What you might want is this:
$hex_num = 0xf4a; printf "0x%x", $hex_num; [download]