It's a little more complicated than that to validate numbers. That regex doesn't allow negative numbers, nor does it allow decimal values. It only accepts positive integers.
For authenticating a single number, it's pretty easy to use Scalar::Util's looks_like_number() function.
You could split on whitespace to isolate two entities, and then test each one to see that it looks like a number.
Dave
In reply to Re: Validating numeric input
by davido
in thread Validating numeric input
by Kaire
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |