Help for this page

Select Code to Download


  1. or download this
    for my $a (0..@a) {
      for my $b (0..@b) {
    ...
    
    # Now sort according to the number of zeros
    return sort {$permutation{$a} <=> $permutation{$b}} keys %permutation;
    
  2. or download this
    return sort {$permutation{$a} <=> $permutation{$b} ||
                 $a cmp $b} keys %permutation;