for (@patterns) { if ( instr($incoming{'text'},$_) > -1 ) { .... } }