Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[Eily]: Clearly this needs some advanced JDWIMA (Just Do What I Mean Already!) magic
[Eily]: I hear perl 8 will even DWYM even when you're not really sure what you mean either

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-09-20 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (237 votes). Check out past polls.

    Notices?