use strict; use Net::FTP; my $server = 'localhost'; my $user = 'user'; my $password = 'pw'; my $targetdir = '.'; my $ftp_file = '../flange'; print("Sending ftp file: ".$ftp_file); my $ftp_session = Net::FTP->new($server, Debug => 1) or die "No ftp connection could be established"; $ftp_session->login($user, $password); $ftp_session->cwd($targetdir); $ftp_session->type("a"); $ftp_session->put($ftp_file); $ftp_session->quit();