Is there a better way for finding anagrams?by perl_wizard2 (Initiate)
|on Aug 04, 2001 at 00:24 UTC||Need Help??|
perl_wizard2 has asked for the
wisdom of the Perl Monks concerning the following question:
You know those puzzles where you answer 5 questions, then take certain letters out of the answers to re-arrange thos letters into a new word?
Once you know the letters that are needed for the last word, is there a good perl program to show you all the combinations of dictionary words that are possible?
I did the code below, but I've got to wonder, is there a better way?
The code above would find all words that have 2 e's, 2 t's, and one each of i, n, g, r and a. The one I found was 'integrate'.
Edit Masem 2001-08-06 - Title appended with "for finding anagrams"