use Net::FTP qw(); my $ftp = Net::FTP->new( 'ftp.kde.org', Timeout => 5, ) or die "Could not connect: $!"; warn "Connected\n"; $ftp->cwd("\/pub\/") or warn "Could not change dir: ".$ftp->message."\n"; $ftp->quit; __END__ $ perl 627154.pl Connected Could not change dir: Please login with USER and PASS.