Your are perfectly right.. Sorry!
On 16 May 2005 06:49:26 -0700, Gisle Aas <[EMAIL PROTECTED]> wrote:
> The Saltydog <[EMAIL PROTECTED]> writes:
>
> > This is my simple script:
> >
> > ======================
> > require LWP::UserAgent;
> >
> > my $ua = LWP::UserAgent->new;
> > $ua->timeout(10);
> > $ua->env_proxy;
> >
> > my $response = $ua->get('http://search.cpan.org/');
> >
> > if ($response->is_success) {
> > print $response->content; # or whatever
> > }
> > else {
> > die $response->status_line;
> > }
> > ===========================
> >
> > If I type a wrong url instead of www.cpan.org, the script doesn't
> > return a "status_line"... This is the program output:
> >
> > HTTP::Response=HASH(0x845d084)->status_line
> >
> > Where am I wrong?
>
> I bet your script has quotes around the "$response->status_line"
> expression. The program above does not produce the output you claim.
>
> Regards,
> Gisle
>