Did you read all the way through Rounding numbers output? The last reply mentions using sprintf.
my $number = 490.408163265306; my $rounded = sprintf("%.2f", $number); print "Number $number is now $rounded\n";
In reply to Re: Decimal rounding
by Mr. Muskrat
in thread Decimal rounding
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |