As in How do I round a number? — Math::Round has a great method for this:
use Math::Round; print nearest(.01, 1.555);
In reply to Re: How do I print/round a number to a given number of decimal places?
by hossman
in thread How do I print/round a number to a given number of decimal places?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |