##
if (grep { /x/ && /y/ && /z/ } $var) {...
####
#!/usr/bin/env perl -l
use strict;
use warnings;
my @test_strings = qw{
ooo xoo oyo ooz xyo xoz oyz xyz
oxo ooy zoo oxy zxo zoy zxy
oox yoo ozo yox ozx yzo yzx
oxyz oxoyz oxoyoz oxoyozo
};
for my $var (@test_strings) {
if (grep { /x/ && /y/ && /z/ } $var) {
print "All in: $var";
}
}
####
All in: xyz
All in: zxy
All in: yzx
All in: oxyz
All in: oxoyz
All in: oxoyoz
All in: oxoyozo