print "all\n" if 3 == grep {$var =~ m/$_/} qw(x y z);
...or...
use List::Util 'all'; print "all\n" if all {$var =~ m/$_/} qw(x y z);
If the patterns contain spaces use a different quoting mechanism.
Dave
In reply to Re: ensure ALL patterns in string
by davido
in thread ensure ALL patterns in string
by previous
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |