This should not allow more than 100 and only two decimal places allowed.$data = 99.9660; if(!($data == 100 || $data =~ /^\d{0,2}(\.\d{0,2})?$/)) { print "Invalid"; }
In reply to Optimize Percentage validation by perl_lover
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |