Edited by: mdharrold
A rather slinky way of doing it is:
$number =~s/(^\d{1,}\.\d{2})(.*$)/$1/;
where $number is the result with too many decimal places.
The \d{2} part controls how many decimal places you want - in this case 2. It doesn't do rounding - just chops off any decimal places you don't want.
>how consistently good O'Reilly books are.
Agreed - I'm a big fan of the 'nutshell' book as well for a quick reference.