Help for this page

Select Code to Download


  1. or download this
    my ($i, %seen) = (0);
    
    my @no_dup =
    ...
        @with_dup;
    
    @no_dup = map { 2 < @$_ ? $no_dup[$_->[0]] : () } values %seen;
    
  2. or download this
    my ($i, %seen) = (0);
    
    my @no_dup =
    ...
        @with_dup;
    
    @no_dup = @no_dup{grep $_ != -1, values %seen};