Unable to connect a website using LWP
- From: prasanna_ssb@xxxxxxxxxxxxxx
- Date: 23 Feb 2006 01:31:48 -0800
Hi,
Iam trying to connect to a website
ftp://ftp.rcsb.org/pub/pdb/data/structures/all/pdb/ to download files
from there. I am using LWP for the same and I am getting the following
Error
Cant get ftp://ftp.rcsb.org/pub/pdb/data/structures/all/pdb/:
HTTP::Response=HASH(0x98ceb34)->status_line at try.pl line 18.
Where can I know what this error code stands for?
Here is the portion of the code referring to this problem
#! /usr/bin/perl
use warnings;
use strict;
use lib '/home/ms2/PERL/LWP/libwww-perl-5.800/lib/';
use LWP;
#Create a UserAgent object
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
#need to make a get request
my $url = 'ftp://ftp.rcsb.prg/pub/pdb/data/structures/all/pdb/';
my $response = $ua->get($url);
if ($response->is_success == 0 ) { die "Cant get $url:\n
$response->status_line"; }
else { # do something }
......other sections of code not added here ......
One more very basic question - what is the difference between CGI and
LWP and when do we use each-- that is- is LWP for client side
scripting and CGI for server side scripting?
Any help appreciated
Thanks
.
- Follow-Ups:
- Re: Unable to connect a website using LWP
- From: Bill Segraves
- Re: Unable to connect a website using LWP
- From: Paul Lalli
- Re: Unable to connect a website using LWP
- Prev by Date: MSVC++ link error
- Next by Date: Re: open3 and STDERR blocking
- Previous by thread: MSVC++ link error
- Next by thread: Re: Unable to connect a website using LWP
- Index(es):
Relevant Pages
|
|