WORD: foreach $word (@data) { foreach my $stopword (@stopwords) { next WORD if $word eq $stopword; } push(@lessWords, $word); } print "@lessWords\n"; #### my %stopwords; # Create an element in the hash for each stop word. undef @stopwords{@stopwords}; foreach $word (@data) { next if exists $stopword{$word}; push(@lessWords, $word); } print "@lessWords\n";