#words I dont want to be part of my loop search: $wordOne = 'longwordOne'; $wordTwo = 'anotherLongWord'; $wordThree = 'thirdLongHere'; #loop search here next if ($_ =~ /(?:$wordOne|$wordTwo|$wordThree)/gi);