##
my $s = "foo";
for (@words) {
print if /$s/;
}
##
##
my($s1, $s2) = qw/ foo bar /;
for (@words) {
print if /$s1/;
print if /$s2/;
}
##
##
my @s = qw/ foo bar /;
for (@words) {
for my $s (@s) {
print if /$s/;
}
}
##
##
my @s = map qr{$_}, qw/ foo bar /;
for (@words) {
for my $s (@s) {
print if /$s/;
}
}