# This is around line 40 # Insert this where the second 'my @wordlist;' is declared. my @wordlist; while () { $_ =~ /(\w*)/; $_ = $1; push @wordlist, $_ if length $_ == length $word[0]; } close (WORDS);