While sprintf works to may want to use Math::Round which will let you round up/down/floor/ceil
use Math::Round; print nearest(0.01, 1.256); __DATA__ 1.26
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Decimal rounding
by tachyon
in thread Decimal rounding
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |