in reply to Integer to Hex?

Assuming $integer stores your integer, this would probably produce a string scalar with the hex value in it:
$hex = unpack("H*", $integer);
Of course you could omit the assignment to $hex and simply print the return of unpack too.