|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: Matching against list of patternsby hv (Parson) |
| on Sep 16, 2004 at 14:07 UTC ( #391451=note: print w/ replies, xml ) | Need Help?? |
|
There are a couple of ways to discover what pattern matched. The easiest is probably to use backrefs:
As warned by other posters, you may need to play with the ordering to ensure that the preferred pattern matches if more than one can, in which case you will also need a way to get back from the index of the matched backreference to the actual pattern. Hugo
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||