$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.
In reply to Re: Re: Check input sub - comments please...
by shenme
in thread Check input sub - comments please...
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |