Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I searched for this, but I could not, for the life of me, think of a concise way to do it, and thus get an answer without asking.
Lets say I have: @array(foo, bar, baz).
and I want to match those items in an or fashion.
thusly: if($bigstring =~ /(foo|bar|baz)/i){blah}
except instead of typing out foo, bar, and baz I would just hit the array instead.
Any hints?
Lets say I have: @array(foo, bar, baz).
and I want to match those items in an or fashion.
thusly: if($bigstring =~ /(foo|bar|baz)/i){blah}
except instead of typing out foo, bar, and baz I would just hit the array instead.
Any hints?
Back to
Seekers of Perl Wisdom