go ahead... be a heretic | |
PerlMonks |
Re: A function to determine if a string is numericby trwww (Priest) |
on Feb 25, 2012 at 06:51 UTC ( [id://956069]=note: print w/replies, xml ) | Need Help?? |
There is also Regexp::Common. Ex: if ( $RE{num}{int}->matches($text) ) {...}if ( $RE{num}{real}->matches($text) ) {...} This library is cool because you can refine/define exactly what you mean by number.
In Section
Seekers of Perl Wisdom
|
|