You probably want something more like this:
open my $FILE , "<", "db.txt" or print "Unable to open 'db.txt' $!"; while ( my $string = <$FILE> ) { if ( $msg =~ /$string/i ) { print "$string found\n"; } } close $FILE;
In reply to Re: Matching a scalar variable
by jwkrahn
in thread Matching a scalar variable
by adneto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |