in reply to Different way of rounding

As you are trying to round to the second decimal, it makes me thinking that, you might be dealing with amount of money. If this is the case, I want to remind you one thing, Perl just like c, its prime types only support floating decimals, not fixed ones. You have to be prepared for some sort of gray areas for errors.

If you are serious about accuracy and precision, better use something like Math::BigFloat.