- or download this
if ($name ~~ [$t1, $t2]) {
...;
}
- or download this
use match::smart "match";
if (match $name, [$t1, $t2]) {
...;
}
- or download this
use match::simple "match";
if (match $name, [$t1, $t2]) {
...;
}
- or download this
use List::Util "any";
if (any { $name eq $_ } $t1, $t2) {
...;
}