in reply to Net::FTP get function question
#!/usr/bin/perl use strict; use warnings; use Net::FTP; use constant HOST => 'ftp.cpan.org'; use constant DIR1 => '/pub/CPAN/authors'; use constant FILE1 => '01mailrc.txt.gz'; use constant DIR2 => '/pub/CPAN/modules'; use constant FILE2 => '02packages.details.txt.gz'; use constant FILE3 => '03modlist.data.gz'; my $ftp = Net::FTP->new( HOST, Debug => 1, Passive => 1, Timeout => 1 ); $ftp->login('anonymous'); $ftp->cwd(DIR1); $ftp->binary; $ftp->get(FILE1); $ftp->cwd(DIR2); $ftp->get(FILE2); $ftp->get(FILE3); $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::FTP get function question
by xiaoyaotan (Initiate) on Mar 11, 2010 at 23:20 UTC |