Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Checking a hash for two matching values.

by farang (Chaplain)
on Sep 17, 2013 at 19:11 UTC ( #1054522=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use v5.16;
    ...
    my @found= grep { my %r =  reverse map fc, %$_;
                      exists $r{cat} && exists $r{dog} } @pets;
    
  2. or download this
    my @found= grep { my %r =  reverse map lc, %$_;
                      exists $r{cat} && exists $r{dog} } @pets;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2016-08-29 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (399 votes). Check out past polls.