#!/usr/bin/perl use strict; use warnings; use Net::FTP::Robust; use Net::FTP::Throttle; use Log::Report; use constant HOST => 'ftp.perl.org'; use constant DIR => '/pub/CPAN'; use constant FILE => 'README'; my $ftp = Net::FTP->new( HOST, Debug => 1, Passive => 1, Timeout => 1, Bytes_read => 40960, BlockSize => 40960, MegabitsPerSecond => 2) or die "Couldn't connect: $@\n"; $ftp->login('anonymous'); $ftp->cwd(DIR); $ftp->binary; $ftp->get(FILE); $ftp->size(FILE); $ftp->quit;