Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: grep with multiple choice

by ferreira (Chaplain)
on Jun 11, 2007 at 11:55 UTC ( [id://620473]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    grep { /^Julia_Roberts/ } @arr
    
  2. or download this
    grep { /^\Q$s\E/ } @arr; # regex with quoted interpolation
    
    # or
    
    grep { index $_, $s == 0 } @arr; # more efficient
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-20 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found