Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
P is for Practical
 
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 contemplating the Monastery: (6)
As of 2014-04-18 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls