> Sorry for leaving the suubject out previously! > > With LWP or LWP::UserAgent I can check if the request > was ok and then print the content if it was like so: > > if ($res->is_success) { > print $res->content; > } > > But I havn't found a way to see what the error is if it > fails. So I have to just : else { print "IT failed, do it > right nect time loser"; } > > What I'd like to be able to do is sometyhign like: > > else { print $res->errstr; }
Dan Have you seen the Oreilly Open books site. It has the "web client programming" book online. http://www.oreilly.com/openbook/webclient/ here is a snip of code from it that may help: -- use LWP::UserAgent; use HTTP::Request; use HTTP::Response; my $ua = new LWP::UserAgent; my $request = new HTTP::Request('GET', $ARGV[0]); my $response = $ua->request($request); if ($response->is_success) { print $response->content; } else { print $response->error_as_HTML; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]