Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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??


in reply to Returning _which_ pattern matched...?

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.
  • Comment on Re: Returning _which_ pattern matched...?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://101879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2021-05-11 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (109 votes). Check out past polls.

    Notices?