in reply to
Finding out which of a list of patterns matched
Have a look at the internals of HTML::TrackerLink. It does something like what you want possibly.
Comment on
Re: Finding out which of a list of patterns matched
In Section
Seekers of Perl Wisdom