#!/usr/bin/perl use strict; use warnings; use Net::FTP; my $path = 'c:/temp'; my $ftp = Net::FTP->new("host.de") or die "Konnte keine Verbindung aufbauen $!"; $ftp->login("name", "passwort") or die "Login failed: $!"; if(opendir(my $handle, $path)) {   while(my $file = readdir $handle) {      next if $file =~ m#^\.\.?$#;      $ftp->put($path . '/' . $file);   }   closedir $handle; } $ftp->quit;