P is for Practical | |
PerlMonks |
Re^2: regex for word puzzleby inman (Curate) |
on Jun 13, 2005 at 12:14 UTC ( [id://466128]=note: print w/replies, xml ) | Need Help?? |
The hash isn't necessary unless you are trying to match multiple words. Just test each word that matches the pattern. This also has the advantage of handling multiple possible anagrams that could exist in the word file. e.g. meat->team->meta->mate. You could also add a simple string length check as the first filter.
In Section
Seekers of Perl Wisdom
|
|