in reply to Simple regex wordlist question

Since you have alread build an array, I'd give grep a try:
my @matching_words = grep(/$your_regular_expression/, @lines);
and $your_regular_expression is something like /[anshef]{6}/i (where 'anshef' is an example for your six valid characters for the word).

k