foreach my $word (@words) { if (/\Q$word/) { # BAD!! $word always changes.