Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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.

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 chanting in the Monastery: (8)
As of 2016-08-27 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (387 votes). Check out past polls.