$seen{$_}++ for @list; my @doubles = grep $seen{$_} == 2, @list;
Makeshifts last the longest.
In reply to Re^3: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
by Aristotle
in thread Perl Idioms Explained - keys %{{map{$_=>1}@list}}
by broquaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |