furenberger has asked for the wisdom of the Perl Monks concerning the following question:
What am I missing here?my $searchThisLine = $lastname . " " . $firstname . " " . $alias . " " + . $phPrefix . " " . $phSuffix . " " . $location . " " . $deptdivcode +slash . " " . $line[16] . " " . $contractorfirm . " " . $nospacelastn +ame . " " . $lanID; foreach my $searchArg(@argument) { print "<br> Searching $searchArg in $searchThisLine<br>"; #search for searchArg in searchThisLine #true means the searchArg was found - so continue processing line #false means the searchArg was not found - so break loop if ($searchThisLine =~ m/$searchArg/i) { print "<br>true<br>"; #this shouldn’t be happening when the user searches pl } else { print "<br>false<br>"; #set the search match flag to false # and call last so this iteration will stop $bSearchMatch = "false"; last; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl string matching pl
by keszler (Priest) on Oct 04, 2011 at 13:12 UTC | |
by furenberger (Initiate) on Oct 04, 2011 at 13:18 UTC | |
|
Re: Perl string matching pl
by toolic (Bishop) on Oct 04, 2011 at 13:14 UTC |