Problems? Is your data what you think it is? | |
PerlMonks |
Re: Re: Checking whether a $var is a numberby wog (Curate) |
on Sep 05, 2001 at 00:32 UTC ( [id://110151]=note: print w/replies, xml ) | Need Help?? |
Unfortunatly checking for non-digits is not sufficient
since these are all numbers:
Checking just for non-digits won't work on those. And you cannot just check for digits, E, e, and ., since these are all not numbers
The only thing that your technique will work for is integers -- certainly not the only thing meant by 'number'.
In Section
Seekers of Perl Wisdom
|
|