[EMAIL PROTECTED] wrote: > > B. Rothstein wrote: > > > Does anyone have any suggestions on how to create an array to > > > hold the value of 1000 factorial? > > > > This will compute it: > > > > perl -MMath::BigInt -le '$n = Math::BigInt->new("1"); $n *= $_ for > > 2..1000; print $n' > > > > in trying to understand this i guess that: > > $n = Math::BigInt->new("1"); > > assigns n a value of 1 and a type "BinInt" > > using the "new" proc with-in module "Math::BigInt"
Yep. new() is a constructor, so $n is an object in the class Math::BigInt. > > the the usual multiplying of 1000 by the number below it... Yes, except that the multiplication operator is overloaded for Math::BigInt objects, so this multiplication operation is turned into a method call. see perldoc Math::BigInt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]