[lug] Perl and large numbers on (K)ubuntu
Gary Hodges
Gary.Hodges at noaa.gov
Fri Sep 23 11:24:32 MDT 2011
I have some Perl code I have used successfully in the past. It makes
use of the Date::Manip module. I pass seconds to it for time
calculations. Yesterday I tried running it on my Kubuntu 10.04 machine,
and it didn't work. I noticed a small number, say one day or one year,
of seconds worked, but not on the order of 100 years. With iterative
trials I found the largest number that works. 2147483647. I did a
google search on that number, and it turns out it has its own Wikipedia
page <http://en.wikipedia.org/wiki/2147483647>. That number is of
course the max value for a 32-bit signed integer.
I have tested this on another Ubuntu 10.04 install without success. The
code does work on a Debian lenny machine. I've tried a few things such
as "use Math::BigInt" and "use bignum", but neither made any difference.
None of the machines I have run this on are running 64-bit Linux.
perl -V doesn't yield anything obvious.
Cheers,
Gary
More information about the LUG
mailing list