> -----Original Message-----
> From: Gomez [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 14, 2001 4:55 AM
> To: [EMAIL PROTECTED]
> Subject: Search Problems
>
>
> I am having a few problems with a search on a DAT file using
> perl with some
> embedded HTML. I want to search for a keyword and display
> the results in a
> certain format which I have done OK in perl, but I have to
> manually put the
> search keyword into the code, the only problem is that I
> cannot get perl to
> get the keyword typed in and then do the search when I run
> the html. Not
> sure if that makes sense but in a nutshell I want to do a
> search and I want
> perl to take the keyword and display the results. Any help
> would be great
> as I have looked everywhere on the net and read loads of
> documentation, any
> amendments to my code if you know the answer would be most
> appreciated.
>
> ...snip code...
Some observations:
1. you have "use cgi;" but it should be "use CGI;" I don't know
what cgi.pm is. Does this even compile?
2. Once you get CGI in there, you access the value of form
fields through the param() method. So at the top of your
script, put:
use CGI;
my $q = new CGI;
my $terms = $q->param('terms');
my $case = $q->param('case');
$terms and $case will be undef on your first time through.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]