Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 contemplating the Monastery: (7)
As of 2014-12-26 04:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (165 votes), past polls