Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
: "out.h". Perl is finding also strings like "macout.h", "rowout.h" and so on. I would appreciate If anyone could tell how I should formulate the search string in order to inhibit finding of these not wanted extra string matches? Part of code below($m='"' and $names[$k] here search string)
BR Hewarnopen (INTER, "file_1.txt") || die "File not found"; while (defined ($row = <INTER>)) { if ($row=~ /$m$names[$k]$m$/g)) { if ($row ne $mytext) { $mytext=$mytext.$row; print " $row\n"; } } } close INTER; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Exact string match
by theorbtwo (Prior) on Jan 14, 2003 at 08:02 UTC | |
|
Re: Exact string match
by BrowserUk (Patriarch) on Jan 14, 2003 at 08:27 UTC | |
|
Re: Exact string match
by boo_radley (Parson) on Jan 14, 2003 at 16:36 UTC |