It's just doing an AND match on the array @words#@words is a bunch of words , $line is the line to search $found = 1; foreach (@words) { next if(($line =~ /$_/i) || ($_ eq "")); $found = 0; } if($found == 1){ #success }
In reply to Need RegExp help - doing an AND match by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |