in reply to Re: Check input sub - comments please...
in thread Check input sub - comments please...
$s = "8b\n";
printf " %smatch\n", ($s=~/^\d*$/) ? '' : 'no ';
no match
printf " %smatch\n", ($s=~/^\d*/) ? '' : 'no ';
match
Without the '$' the checking is, um, untrustworthy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Check input sub - comments please...
by ysth (Canon) on Dec 14, 2003 at 18:17 UTC | |
by shenme (Priest) on Dec 14, 2003 at 22:05 UTC |