Isn't the initialisation ok? A string is being passed.
I think it's the usage of $m after its creation that is behaving more
predictably than a normal perl number ie how it behaves when
stringified. Therefore using $m in string context (in "" or in RE)
will result in a predictable conversion to text rather than the size
sensitive stringification of perl numbers.
> On 1/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Thanks! This is what I'm looking for.
> >
> > -------------- Original message --------------
> > From: "DePriest, Jason R." <[EMAIL PROTECTED]>
> >
> > > use Math::BigFloat;
> > > $m = Math::BigFloat->new('7191750529163469.123'); # notice NO
double
> > > quotes, this is still a number
>
> I am worried that a wrong meme might begin here and spread. Single
> quotes and double quotes both yield strings in Perl. Double quotes
> interpolate and single quotes don't.
>
> The constructor of Math::BigFloat takes a string argument:
> # Number creation
> $x = Math::BigFloat->new($str);
>
> If you don't give it a string, it will make a string out of what it
> has, possibly
> after converting it to a normal float and back, which is what may
have been
> happening.
>
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
>
--
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs