http://qs321.pair.com?node_id=339933


in reply to Simple Rounding

Greetings Fellow Monk!
In the standing philosophy of "There Is Always More Than One Way To Do It" I found this CPAN module, Math::Round, which should also do what you are looking for. I have included a chunk of example/test code below:
#!/usr/bin/perl -w use strict; use Math::Round; my $number=1100.64686081907; $number=nearest(.01,$number); print "$number\n"; ___OUTPUT___ 1100.65