in reply to A function to determine if a string is numeric
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: A function to determine if a string is numeric
by zborsos (Initiate) on May 18, 2020 at 11:28 UTC | |
by Tux (Canon) on May 18, 2020 at 12:17 UTC | |
by hippo (Bishop) on May 18, 2020 at 12:19 UTC |
In Section
Seekers of Perl Wisdom