in reply to recursively generating permutations
If you like to write LISPish code, why don't you checkout LISP? It supports lambda, mapcar, etc. It allows you to almost do a direct translation of your LISP code to Perl.
In Section
Seekers of Perl Wisdom