in reply to How do I print/round a number to a given number of decimal places?

As in How do I round a number?Math::Round has a great method for this:

use Math::Round; print nearest(.01, 1.555);

  • Comment on Re: How do I print/round a number to a given number of decimal places?
  • Download Code