Help for this page

Select Code to Download


  1. or download this
    for my $y (0..$#list) {
       for my $x ($y+1..$#list) {
          ...
       }
    }
    
  2. or download this
    my %counts;
    ++$counts{$_} for @list;
    my $dups = grep { $_ > 1 } values(%counts);
    die "Walrus Festival!" if $dups >= 3;
    
  3. or download this
    my %counts;
    my $dups;
    ...
          }
       }
    }