Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Common hash keys

by FunkyMonk (Canon)
on Jun 07, 2008 at 10:41 UTC ( #690825=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    DB<2> $seen{$_}++ for (keys(%a), keys(%b))
    DB<3> x grep { $seen{$_} > 1 } keys(%seen)
    
  2. or download this
    use Data::Dump;
    
    ...
    
    my %seen;
    pp grep { $seen{$_}++ } keys %a, keys %b;
    
  3. or download this
    pp grep { state %seen; $seen{$_}++ } keys %a, keys %b;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (23)
As of 2014-04-17 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (453 votes), past polls