Help for this page

Select Code to Download


  1. or download this
    # The @AllPatterns array is probably fed elsewhere, this is just for t
    +he test
    @AllPatterns = ([qw(1 2 1 1 8)],
    ...
    } 
    
    for $k (sort keys %h) { print "$h{$k} - $k\n"; }
    
  2. or download this
    @AllPatterns = ('1 2 1 1 8',
            '1 6 5 12 12',
    ...
    for $v (@AllPatterns) {
        ++$h{join(' ',sort {$a <=> $b} split(' ',$v))};
    }