Re: easy (should be) perl question..
by "Scott Johnson" <scott(at)dsuper.net>
|
Date: |
Sat, 27 Jan 2001 12:59:12 -0500 |
To: |
<CHarris(at)checkfree.com>, <hwg-servers(at)hwg.org> |
References: |
ckfr |
|
todo: View
Thread,
Original
|
|
Hi,
Here is one I use to check is it's not all numbers.
if (!($H_phone =~ /^[0-9]*$/)) {
Scotty.
----- Original Message -----
From: <CHarris(at)checkfree.com>
To: <hwg-servers(at)hwg.org>
Sent: Friday, January 26, 2001 1:34 PM
Subject: easy (should be) perl question..
> i'm trying to verify that input is numeric. the following scenarios have
> not worked:
>
> $octet1 = ABC; # how it's defined to test it
>
> if ( $octet1 =~ / \D / )
>
> if ($octet1 =~ / ^0-9 / )
>
> if($octet1 =~ / [^0-9] / )
>
> any help would be greatly appreciated.
>
>
> Chris Harris, MCSE
> Staff Technical Analyst
> Transmissions Implementations
> 512-377-6170
>
HWG: hwg-servers mailing list archives,
maintained by Webmasters @ IWA