in reply to Validating numeric input
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Validating numeric input
by Anonymous Monk on Feb 05, 2005 at 06:12 UTC |