if ( $ARGV[0] =~ /^\d+$/ ) {    # Simple number
                                                # If minus sign, decimal
point, etc, then would need to add
                                                # Following checks for
negative number and decimal point
                                                # $ARGV[0] =~ /^-*\d+.*\d*$/

       }elsif ( $ARGV[0] gt ' ' ) { # if looking for something specific
would add here.

       }

Wags ;)
-----Original Message-----
From: Felipe Figueiredo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 17:09
To: [EMAIL PROTECTED]
Subject: Lame question


Hi all,

how do I test if a variable caught from ARGV (just for an example) is a 
number, or string?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to