Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 cooling their heels in the Monastery: (14)
As of 2015-01-28 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (215 votes), past polls