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

I have worked around this problem by doing this before calling printf:
$number += 0.001 if $number =~ m/\.\d{2}5$/;
  • Comment on Re^2: Answer: How do I print/round a number to a given number of decimal places?
  • Download Code