in reply to not in my browser (truncated output)
This will turn off output buffering, which sometimes causes the output of CGI scripts to be incomplete on FreeBSD boxes, especially when running outside processes; at least, that was my experience.use CGI; $| = 1; ...
If lynx is timing out, as fglock mentioned, you could also take a look at LWP::UserAgent, here's a snippet:
Turning off buffering will also allow you to see your script errors in the browser. I find this handy when I need to write a short script, such as you have here, and I need to see the output in the browser whether it completes or not.use LWP::UserAgent; $ua = new LWP::UserAgent; # Create a request my $req = new HTTP::Request GET => "http://www.craigslist.org/sfo/$cat +egories[$i]"; # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print "Bad luck this time\n"; }
--
.dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: not in my browser (truncated output)
by mkahn (Beadle) on Jul 11, 2002 at 20:31 UTC | |
|
Re: Re: not in my browser (truncated output)
by mkahn (Beadle) on Jul 12, 2002 at 21:02 UTC |