#!/usr/bin/perl if (fork) { use Net::FTP; $ftp = Net::FTP->new("ftp.remoteserver.com", Passive => 1, Timeout => 300, Debug => 0) or die "Cannot contact $host: $!"; $ftp->login("user1",'password1'); $ftp->binary(); $ftp->put("/home/users/web/blah/directory/file1"); $ftp->quit; } else { $ftp = Net::FTP->new("ftp.remoteserver.com", Passive => 1, Timeout => 300, Debug => 0) or die "Cannot contact $host: $!"; $ftp->login("user2",'password2'); $ftp->binary(); $ftp->put("/home/users/web/blah/directory/file2"); $ftp->quit; } print "Content-type: text/html\n\n"; print <<"EOF"; Transfer Complete! EOF exit;