elton247 has asked for the wisdom of the Perl Monks concerning the following question:
i am having trouble with the elsif ($search =~ /$filein/i) { part. $filein is a CSV file that looks something like this:if ($com eq "Submit Search") { opendir (TEMP, 'po'); @files = readdir(TEMP); foreach $file (@files) { open(FILE,"po/$file") || die "can't open "; $filein = <FILE>; close (FILE); # $filein =~ s/,/ /g; if (-d $file) {} elsif ($search =~ /$filein/i) { print "<a href=\"index.cgi?file=$file\">$file</a> +<br><br>"; } else {print "<br>File not Found<br>"; } } }
So if i search for "james", it comes up as "file not found" even though "james" is clearly in the file. But The File will be found if all it has in it is the word "james". Am i totally missing something. I hope you all can understand what i am looking for. Thanks EltonD04101,4/10/01,4,30,01,James Bernard,PO Box 4623,Chicago,IL,60680-4623 +,773-379-9873,,,Self-Inking Stamp Red
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ichimunki) Re: trying to create search engine
by ichimunki (Priest) on Apr 13, 2001 at 01:17 UTC | |
by elton247 (Initiate) on Apr 13, 2001 at 21:02 UTC | |
|
Re: trying to create search engine
by geektron (Curate) on Apr 13, 2001 at 03:33 UTC |