if ( $temp2 =~ /[^a-zA-Z]/ ) { die "Wrong input"; } else { # Do something useful }
This is a very strong way to work. You're whitelisting and not blacklisting, which is best.
In reply to Re: Regular expressions
by dragonchild
in thread Regular expressions
by DDH
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |