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