More recent Perls (5.6?) support the POSIX [:class:] syntax, you you can do things like this:
--if (/^[:alpha:]+/) { print "string is alpha"; } elsif (/^[:digit:]+/) { print "string is digits" } else { print "sting is weird stuff"; }
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: isAlpha / isNumeric
by davorg
in thread isAlpha / isNumeric
by Jamnet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |