Regexp::Common might keep you from reinventing the wheel:
use Regexp::Common; while (<DATA>) { chomp; /^$RE{num}{real}$/ and print "$_ is a number\n"; } __DATA__ 123 abc 0.123
In reply to Re: Checking whether a value is numeric or not
by almut
in thread Checking whether a value is numeric or not
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |