Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
No, it is not that simple as the following code demonstrates:
This will print 'valid', even though it does not meet the OP's criteria. Thus, if the value "123abc" is passed from a web form to a cgi script, the code you suggest will validate it. The reason for this is because when using numeric comparisons, Perl will treat any string that begins with a number as a number. This is clearly not what the OP wants. davidj In reply to Re^2: Filtering CGI Input
by davidj
|
|