my $alpha = 'J'; my $num = '3'; $alpha =~ /^ [[:alpha:]] $/x and print 'correct'; $alpha !~ /^ [[:digit:]] $/x and print 'correct'; $num =~ /^ [[:digit:]] $/x and print 'correct'; $num !~ /^ [[:alpha:]] $/x and print 'correct';
In reply to Re: character test functions
by ioannis
in thread character test functions
by beginer_in_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |