open( LIST, "stopwords.txt" ) or die "$!"; my @stopwords = ; chomp(@stopwords); # <- was missing my %stopwords; # Create an element in the hash for each stop word. undef @stopwords{@stopwords};