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";
In reply to Re: Getting permutations of length n of an array of length greater than n?
by tybalt89
in thread Getting permutations of length n of an array of length greater than n?
by LittleJack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |