Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Common hash keys

by FunkyMonk (Chancellor)
on Jun 07, 2008 at 10:41 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://690825]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-18 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found