On 26 Apr 2005 13:35:27 -0000, Govardhan M. V wrote:
>
> Hi,
> Thanks for the help,
> put i tried this
> use Math::BigInt;
> $a = Math::BigInt->new("12345678901234567890");
> printf("%.0f\n",$a);
>
> out put is
> 12345678901234567168
>
> which is not right so please do let me know how do i go about it .
> My problem is in printing. can you let me know how do i over come this
> issue.
>
Hi,
Please don't top post. Please don't use HTML emails. Please reply to the list.
With that out of the way, Depending on your needs, you can use "%s" as
the printf format string, or use simply print:
################ begin code
use strict;
use warnings;
use Math::BigInt;
my $num = Math::BigInt->new("12345678901234567890");
print "Orig string: 12345678901234567890\n";
printf "printf output: %s\n",$num;
print "print output: $num\n";
################ end code
HTH,
--
Offer Kaye
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>