Thanks! The perlfaq4 example (with the ! for unique removed) is the one that I'll use from now on.
my %seen = (); my @duplicates = grep { $seen{ $_ }++ } @array;
In reply to Re^2: What is the best way to get just the duplicates from an array?
by wenD
in thread What is the best way to get just the duplicates from an array?
by wenD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |