in reply to Unable to complete download with Net::FTP
I would check the return code of each $ftp->... call just in case something wrong is happening:
use strict; use warnings 'all'; use Net::FTP; my $host = 'ftp.ncbi.nih.gov'; my $ftp = Net::FTP->new($host, Debug=>0) or die "Cannot connect to $host ", $ftp->message; $ftp->login('anonymous', 'anon@anon.com') or die "Cannot login ", $ftp->message; $ftp->cwd('/refseq/LocusLink/') or die "Cannot cwd ", $ftp->message; $ftp->type('binary') or die "BINARY failed ", $ftp->message; $ftp->get('LL_tmpl.gz') or die "Cannot get file ", $ftp->message; $ftp->quit; # well ... almost every call ;)
Take a look at the Net::FTP docs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Unable to complete download with Net::FTP
by Itatsumaki (Friar) on Nov 28, 2003 at 22:11 UTC |