Help for this page
use Algorithm::Loops qw( NextPermute ); ... do { print(join(', ', @list), "\n"); } while (NextPermute(@list));
There are 24 permutations of abcd, 4 taken at a time: abcd, abdc, acbd, acdb, adbc, adcb, ... There are 3 combinations of abcd, 3 taken at a time: abc, abd, acd, bcd