From: "Shawn H. Corey" <shawnhco...@gmail.com>
Octavian Rasnita wrote:
Well, in PHP that calculation is made well, so I think there is a bug in perl.


No, it's not.  PHP rounds off the number before printing.  In Perl:

printf "%.2f", $x;

or

$x = sprintf "%.2f", $x;


Ok, thank you all for your help.

Octavian


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to