# by bliako for https://perlmonks.org/?node_id=1230512 use strict; use warnings; use Algorithm::Combinatorics qw/permutations/; die "Usage : $0 number" unless scalar @ARGV; my @digits = split //, $ARGV[0]; my $iter = permutations(\@digits); print "$0 : permutations for $ARGV[0]:\n"; while (my $p = $iter->next) { print " ".join(",", @$p)."\n"; }
bw, bliako
In reply to Re: Next permutation
by bliako
in thread Next permutation
by aartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |