# read through the directory containing all of the formatted # .ord files processed above and ftp them to SAP. delete the # files when after they have been transfered. use NET::FTP; my $hostname='secret.server.mycompany.com; my $user='anonymous'; my $password='anonymous'; my $ftp=Net::FTP -> new($hostname); ftp->login($username,$password); $ftp->ascii; chdir( "output/$dir" ); opendir( DIR, "output/$dir" ); @files = readdir( DIR ); # transfer all of the output files # in the output directory to SAP. foreach( @files ) { $filehandle = $_; $ftp->put("output/$filehandle"); unlink( "$filehandle" ); } # end foreach $ftp->quit;