SPUG: 0 == undef
david.dyck at fluke.com
Wed Apr 7 14:45:42 CDT 2004
On Wed, 7 Apr 2004 at 12:27 -0700, Tim Maher <tim at consultix-inc.com> wrote:
> Maybe the latest Regexp::Common (which I don't have handy)
> has a regex to match numbers, otherwise, it's pretty easy
> to roll your own (but don't forget leading - signs, and
> embedded decimal places).
The online perl FAQ give advice on testing for numbers, try:
perldoc -q determine number
which will provide advice for testing for number
Yes Regexp::Common has a lot of support for matching numbers
which provides regexes for numbers (integers and reals).
You are warned
Do not use this module directly, but load it via
It even parses Roman numerals!
More information about the spug-list