$integer =~ s/(.*)(\.\d\d+)$/$1/; $float = $2; # do stuff $integer .= $float; [download]
In reply to RE: open ended floats by bastard in thread regexp for adding commas to a number by Kozz