use strict; use Regexp::Match::Any; my @array = qw(Foo Bar Baz); my $bigstring = 'whatever'; if($bigstring =~ match_any(\@array)){ print "It matched\n"; }else{ print "It didn't match\n"; }
In reply to Re: matching elements in a list in a logical OR fashion
by meetraz
in thread matching elements in a list in a logical OR fashion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |