Using a Net::FTP Object : FTP « Network « Perl
- Perl
- Network
- FTP
Using a Net::FTP Object
#!/usr/bin/perl
use warnings;
use strict;
use Net::FTP;
my $ftp = Net::FTP->new("ftp.cpan.org")
or die "Couldn't connect: $@\n";
$ftp->login("anonymous");
$ftp->cwd("/pub/CPAN");
$ftp->get("README.html");
$ftp->close;
Related examples in the same category