![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Returning _which_ pattern matched...?by bikeNomad (Priest) |
on Aug 03, 2001 at 08:06 UTC ( #101879=note: print w/replies, xml ) | Need Help?? |
No, it's quite simple. After the match, the variable $1 will be set to whatever matched your pattern -- which will be one of the three. Likewise for $2, etc. for later () sub-patterns. You'll still have to do something with that information, of course.
In Section
Seekers of Perl Wisdom
|
|