http://www.perlmonks.org?node_id=485069


in reply to recursively generating permutations

You should look at Algorithm::Loops, and, through Super Search, to the following PM links: