WORD: foreach $word (@data) { STOP: foreach $stop (@stopwords) { next WORD if $word eq $stop; # <--- } push(@lessWords, $word); }