in reply to perlgolf - bruteforceing an array
Borrowed from merlyn's Permutations and combinations
or does it need to be sorted?print join ",", @$_ for combinations('#','*',0..9); sub combinations { return [] unless @_; my $first = shift; my @rest = combinations(@_); return @rest, map { [$first, @$_] } @rest; }
|
|---|