adneto has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching a scalar variable
by jethro (Monsignor) on Jul 31, 2009 at 17:56 UTC | |
|
Re: Matching a scalar variable
by jwkrahn (Abbot) on Jul 31, 2009 at 18:21 UTC | |
|
Re: Matching a scalar variable
by alexm (Chaplain) on Jul 31, 2009 at 21:30 UTC | |
|
Re: Matching a scalar variable
by Anonymous Monk on Jul 31, 2009 at 17:45 UTC |