in reply to Why can't I start up lynx with these arguments?

The problem is in this line here:
$search .= "&btnG=Google+Search";
The & in the exec'd line is causing the lynx process to background itself, thus giving you the defunct lynx process.
You are effectively doing:
lynx www.google.com/searcn?q=whatever&btnG=Google+Search --cookies whatever
(Presuming the last '$search =' is actually supposed to be '$search .=', which would also screw things up)

To stop the process from being backgrounded, double-escape the & symbol. (Once to escape the & for the shell, and once for perl itself to pass the \ through to the shell).

$search .= "\\&btnG=Google+Search";
JP
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

Replies are listed 'Best First'.
Re: Re: Why can't I start up lynx with these arguments?
by Saint Aardvark (Acolyte) on Jul 26, 2001 at 19:18 UTC
    Thanks to everyone who replied...When I saw the double-escape answer, I smacked myself on the forehead and uttered the Sacred Syllable "D'oh!"

    While I like w3m well enough, I'm used to lynx. And this was meant to be a way of learning better how to do a quick and dirty hack, rather than parse search results for other nefarious ends.

    I am now blessing your keyboard...