arun_jones has asked for the wisdom of the Perl Monks concerning the following question:

Hi Friends, Happy New Year... In my work i need to download files from PDB database, i am able to download files from http by using WWW::Mechanize, but this is an ftp site, so i tried the Net::FTP module but not able to do properly.here my institute is having proxy, so i need to cross the proxy authentication also.below is the code that iam using. can you people give some suggestions or correct the code.

$host = "ftp://ftp.wwpdb.org/pub/pdb/data/structures/all/pdb/"; $f = Net::FTP->new("$host", Debug => 0) or die "Cannot connect $@"; $f->get($host/$pdb_download); open ($pdb, ">$pdb.pdb"); print $pdb $f->content();

Replies are listed 'Best First'.
Re: Downloading files from FTP through proxy
by Khen1950fx (Canon) on Jan 01, 2013 at 09:38 UTC
    Why are you using Net::FTP? WWW::PDB is what you want to use. Give it a try. If you encounter problems, come back here.
Re: Downloading files from FTP through proxy
by Anonymous Monk on Jan 01, 2013 at 07:11 UTC
    Use WWW::Mechanize?