sprintf is what you want. sprintf lets you do lots of fun things to the format of numbers or strings, including rounding fractions. The docs are a wee bit confusing if you've never used printf before, so here's a shortcut:
$number = 12.3456789;
$rounded_number = sprintf("%.2f", $number);
print $rounded_number; # prints 12.35
Gary Blackburn
Trained Killer