develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [ID 20000316.002] Math::BigInt and string ops

Thread Previous
From:
Gurusamy Sarathy
Date:
March 16, 2000 09:52
Subject:
Re: [ID 20000316.002] Math::BigInt and string ops
Message ID:
200003161751.JAA21104@maul.ActiveState.com
On 16 Mar 2000 11:58:57 +0100, "Matthias Urlichs" wrote:
>$ perl -e 'use Math::BigInt;
>           $foo = new Math::BigInt 12345;
>           $foo =~ s/^\+//;
>           print "$foo\n";
>           $foo = int($foo/10+0.5);
>           print "$foo\n"; '
>+12345
>NaN
>
>*Sigh* Under 5.005, the above code was a legitimate method to convert
>$foo to a normal string/number/whatever, thus the above code actually
>printed
>
>12345
>1235
>
>instead. Can we please reinstate the old behavior?

Is it the s/^\+// that's broken?


Sarathy
gsar@ActiveState.com

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About