in reply to
Single string pattern match
if ($str =~ /((abc)|(pqr)|(xyz))/)
$1 would contain first pattern that matches. (update: added external () to make $1 work)
Comment on
Re: Single string pattern match
Download
Code
In Section
Seekers of Perl Wisdom