http://qs321.pair.com?node_id=11141288


in reply to A Word Game (Update 3)

Thanks for this!

I was unfortunate enough to randomly get a non-word from my /usr/share/dict/words file:

fldxt
I added a grep to only allow words with a vowel (or "y"):
@dict{ map uc, grep /[aeiouy]/, map /^([a-z]{5})$/, <$FH> } = ();
I found this out by adding an option to print the current word at the end:
print "\n Answer = $curr_word\n" if @ARGV;