in reply to Dollars and regex cents

*laughs* You don't need a regex. You need simple CS 101 logic.
my @values = ('5.5', '9', '19.95'); foreach my $value (@values) { my $dollars = int $value; my $cents = $value - $dollars; my $converted_value = sprintf "\$$dollars.%02d", int ($cents * 100 + + .5); print "$converted_value\n"; } ---- $5.50 $9.00 $19.95

------
We are the carpenters and bricklayers of the Information Age.

Vote paco for President!