Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: grep with multiple choice

by ferreira (Chaplain)
on Jun 11, 2007 at 11:55 UTC ( #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? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2022-11-30 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?