http://www.perlmonks.org?node_id=398675


in reply to Math 101 anyone?

Hello smcone,

You can use the sprintf function to round your numbers to 2 decimal places, something like this:.

perl -e "print sprintf ('%.2f', (100.10-100));"

Thanks,
Greg W.