Not very generic, but at least easy to understand:

m/^(.+?\.[0-9]{2})/;

123.456789 becomes 123.45