in reply to Re: Re: perls long number problem
in thread perls long number problem

Perl can only handle integers up to the size it was configured with. But it can handle numbers larger that that. Try your example with

sprintf("%{$len}.0f",$number);

And you will see the number just fine. This is because perl uses doubles to hold real numbers, which can typically hold numbers of more bits. On most machines perl runs, integers are 32 bits and doubles use 53 bits for the mantissa.

So yes, perl can handle larger numbers without strings, providing you don't convert them to integers