When you write


     $searchengine = $q-> param("$se{searchengine}");
     %se = { "av" => "AltaVista",
             "yh" => "Yahoo",
             "gg" => "Google"};


... why do you define %se after you have used it, instead of before? Why do
you redefine it on every call to the subroutine? Why do you call for
$se{searchengine}, when you have only defined $se{av}, $se{yh} and $se{gg}?
Why do you call the subroutine only once?

- Roger -

----- Original Message -----
From: "Sunthari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 10:41 AM
Subject: Pls help me 2 troubleshoot


> Dear List,
>
> I'm quite a beginner to Perl (it's going to be almost
> 2 mths).I've written the following codes and I can't
> seem to get the correct output where user's can choose
> their search engine for search. Pls correct me since
> I'm really lost.
>
> Secondly, I want to use the HTML::TreeBuilder to read
> the search results and pick up the lines with the
> search terms. How should I go abt it? Care to share
> some info.
>
> Should I put the search results from e.g <body> till
> </body> into HTML::TreeBuilder and do a match to pick
> the lines?  Any suggestions/comments to this?
>
> Thanks in advance. Hope to hear a.s.a.p
>
> Rgds,
>
>
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to