Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Returning _which_ pattern matched...?

by scain (Curate)
on Aug 03, 2001 at 19:02 UTC ( #102002=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($string =~ /re1/ || $string =~ /re2/ || $string =~ /re3/)
    
  2. or download this
    if      ( $string =~ /re1/ ) {
    #do thing 1
    ...
    } elsif ( $string =~ /re3/ ) {
    #do thing 3
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-09-28 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?