Hi,
This question is not Perl-specific but Perl is the language I love implementing things in because it gets 'em done! Hopefully it won't let me down this time.
I'm looking for a way to cycle through all unique orderings of an array. I feel like there's a trick to do this but I just can't find it!
Say I have an array [$a, $b, $c, $d, $e, $f], what would be the fastest or easiest way to loop through every possible way this array can be sorted?
The arrays I would be using are not fixed in length, so the number of possible orderings will be HUGE and hard coding the loop(s) is NOT an option :-(
Thank you for your time, I'll give it back someday :-)
CBAS
In reply to Uniquely sorting arrays by $CBAS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |