Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Checking a hash for two matching values.

by walkingthecow (Friar)
on Sep 17, 2013 at 04:10 UTC ( #1054383=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @results = grep { grep { $_ =~ /(?=.*cat)(?=.*dog)/i } values %$_ }
    + @{ $lines };
    
  2. or download this
    grep { grep /cat/, grep /dog/, values %h }
    grep { grep /cat/, values %$_ } grep { grep /dog/, values %$_ } @aoh
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2016-07-28 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (255 votes). Check out past polls.