--- Frank Newland <[EMAIL PROTECTED]> wrote:
> Readers,
> 
> I've been to cpan.org site but some of the pages are not appearing.
> what does Math::BigInt do in the following  perl line?
> 
> $amount= Math::BigInt ->new("$posted_amount");   
> 
> 
> tia,
> 
> Frank
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
Frank,

Math::BigInt is in the standard Perl distribution, so you probably have it on whatever 
system you
are using.  Type 'perldoc Math::BigInt' on the command line for an explanation of this 
module.

What the new constructor does in your example is create a new Math::BigInt object.  It 
will test
whether or not what you passed is a number, but other than that, it really doesn't do 
anything
beyond blessing your number into the appropriate class.  The benefit of this is that 
you can now
take advantage of the overloaded operators that Math::BigInt creates and do arbitrary 
precision
integer math.  See the documentation for more details (or even better, open the module 
and see
what it does -- it should teach you a lot about Perl).

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to