Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 browsing the Monastery: (18)
As of 2014-10-22 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (119 votes), past polls