open $FILE , "<", "db.txt" or print "Unable to open file"; @idstring = <$FILE>; $count = 0; while ($idstring[$count]) { $string = $idstring[$count]; if ($msg =~ m/.*$string.*/i) { print "$idstring[$count] found"; } $count++; } close $FILE;
In reply to Matching a scalar variable by adneto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |