Using a Net::FTP Object : FTP « Network « Perl






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

1.Using Net::FTP to get a file on the server
2.Simple FTP client
3.The following commands allow you to pick up a file via FTP
4.Login to a FTP server