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

Re^3: Perl Idioms Explained - keys %{{map{$_=>1}@list}}

by Aristotle (Chancellor)
on Aug 05, 2003 at 17:51 UTC ( #281104=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
in thread Perl Idioms Explained - keys %{{map{$_=>1}@list}}

No, that won't fly. You need

$seen{$_}++ for @list; my @doubles = grep $seen{$_} == 2, @list;

Makeshifts last the longest.


Comment on Re^3: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-08-01 22:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (51 votes), past polls