[thelist] pattern matching question

Jeremy Ashcraft ashcraft at 13monkeys.com
Wed Jul 26 16:23:14 CDT 2000


    I'm a bit stuck here.  I'm trying to determine whether a variable
consists of just numbers or has characters and numbers in it.   I tried

$foo =~ /\D/

to catch any non-digits, but since I pull this var out of a DB as text,
i think perl is treating it as text also, even if it is just a number.
Any help is much appreciated.

Jeremy

-----------
Jeremy Ashcraft
13monkeys.com






More information about the thelist mailing list