Help for this page

Select Code to Download


  1. or download this
    my %count;
    for (@items) { $count{$_}++ }
    my @dups = grep { $count{$_} > 1 } @items;
    
  2. or download this
    my (%count, @dups);
    for (@items) { $count{$_}++ == 1 && push(@dups, $_) }