Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: grep for lines containg two variables

by gjb (Vicar)
on Dec 07, 2005 at 16:41 UTC ( #514889=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      @interesting_lines = grep {/$string1/ xor /$string2/} @log;
    
  2. or download this
      @interesting_lines = grep {/$string1/ and /$string2/} @log;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-09-15 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (146 votes), past polls