- or download this
for ("ab", "cd") {
if ($str =~ /$_/) { ... }
}
- or download this
($x, $y) = ("ab", "c");
for (1, 2) {
if ($str =~ /$x$y/) { ... }
($x, $y) = ("a", "bc");
}
- or download this
my @strings = make_10_strings();
for (@strings) {
...
if ($_ =~ $p) { handle($_) }
}
}
- or download this
my @strings = make_10_strings();
for (@strings) {
...
if ($_ =~ $p) { handle($_) }
}
}