use strict; use warnings; use Net::FTP; my ($host, $user, $pass) = qw(host.some.domain username password); my $ftp = Net::FTP->new($host) || die "Could not open connection to '$host'"; $ftp->login($user,$pass) or die "could not login: $!"; $ftp->cwd("test"); $ftp->get("that.file"); $ftp->quit();