in reply to Checking for numbers and a period
One way to do this would be:
my $price = "123.45"; if ($price =~ m/^\d*\.\d{2}$/) { .. } [download]
For more pattern matching related questions please read the perlre manpage..
Regards, -octo