Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: unpack'ing "64-bit quantities"

by Xilman (Hermit)
on Jun 19, 2010 at 20:07 UTC ( [id://845570] : note . print w/replies, xml ) Need Help??

in reply to unpack'ing "64-bit quantities"

For portability reasons, I'd unpack them into two 32-bit variables and then process them further. This will work regardless of whether you have a 32-bit or 64-bit Perl.

What you do after that depends on what you mean by "more or less human readable". I happen to find hexadecimal more or less readable, in which case displaying first the more significant and then the less significant 32 bit values is acceptable.

If you wish to display them as decimal integers, you can either roll your own code in a (fairly obvious) manner or exploit the capabilities of the Math::BigInt module.