in reply to Reverse of hex?

sprintf with %x is one way:
my $hex = sprintf("%x",$decimal);
You can use pack/unpack as well:
my $hex = unpack 'H*',pack('N',$decimal);
but you will probably want to trim the leading zeroes.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)