#test if ast file exists -e $astfile or die "Error: '$astfile' does not exist"; #open FTP session with remote server $ftp=Net::FTP->new($elutionsFTP, Timeout=>20, Debug=>0, Passive=>1) or $err=1; if($err){ logit("$error_time_stamp >Unable to connect to remote FTP server $elutionsFTP\n$!"); die; } #login to to remote FTP server $ftp->login("$elutionsID", "$elutionsPWD") or $err=1; if($err){ logit("$error_time_stamp > Unable to login to remote FTP server $elutionsFTP as $elutionsID\n$!"); die; } #change directory on FTP server $ftp->cwd($putdir) or $err=1; if ($err) { logit("$error_time_stamp > Unable to change directory $putdir on $elutionsFTP server\n$!"); die; } $ftp->binary(); # set binary mode $ftp->put($astfile) or $err=1; if ($err) { logit("$error_time_stamp > Error transferring $astfile\n$!"); die ; } # Log successfull upload logit("\n\n$error_time_stamp > Transfer successfull: FTPserver: $elutionsFTP\n File: $astfile\n$!"); # End session $ftp->quit(); exit 0;