Jon Bentley, in his book Programming Pearls (Addison-Wesley, Reading, Massachusetts: 1986) had a section devoted to almost exactly this problem. Translating his programs (in a mix of awk and C) into Perl should be easy. Try the Programming Pearls web site].
I'll leave it as an exercise.
emc
" When in doubt, use brute force." — Ken ThompsonIn reply to Re: scrambling all letters in a word until all combinations are found
by swampyankee
in thread scrambling all letters in a word until all combinations are found
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |