http://qs1969.pair.com?node_id=11140592


in reply to Getting permutations of length n of an array of length greater than n?

Alternate way

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11140589 use warnings; use ntheory qw( forcomb forperm ); forcomb { my @sel = @_; forperm { print @sel[@_], ' ' } scalar @sel; } 8, 5; print "\n";
  • Comment on Re: Getting permutations of length n of an array of length greater than n?
  • Download Code