Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: matching elements in a list in a logical OR fashionby Anonymous Monk |
on Jun 16, 2004 at 15:21 UTC ( [id://367268]=note: print w/replies, xml ) | Need Help?? |
my @array = qw( foo bar baz );
print grep(/^$bigstring$/, @array)? "match" : "no match","\n";
try that.
In Section
Seekers of Perl Wisdom
|
|