my @matches = ( $element =~ /(WEED)/, $element =~ /(DIAL)/, $element =~ /(PIES)/, $element =~ /(KILLD)/, ); if (@matches) { ... }