Help for this page

Select Code to Download


  1. or download this
    my %seen;
    $seen{$_}++ foreach @array_whatsit;
    
  2. or download this
    my @duplicates = grep {$_ if $seen{$_}>1} keys %seen;
    print "There are ", @duplicates+0, " duplicates.\n";