foreach $keyword ( @keywords ) { $sql_stmt .= " AND ( PlantDescription REGEXP "s/\$keyword/" );" }