foreach $file (@ftp_files) { $rem_file = 'xxrc_total.' . $file ; $renamed_file = $transferred_dir . '/' . $file ; $msg = "Transferring file $file as $rem_file" ; &update_report("$logfile","$msg",1,1,0) or &end_it($mail_msg,$to,$from,$subject,$msg,$text,$attachments) ; $msg = "<***** Sectran was unable to transfer $file *****>." ; $result = sectran::sectran('CRTRANSSHPARAMS',"$rem_file","$file"); print "\n\t\tWe never get to this point do we?!\n" ; if ($result != 0) { &ACC_BOX($msg,$logfile) or &end_it($mail_msg,$to,$from,$subject,$msg,$text,$attachments) ; &end_it($mail_msg,$to,$from,$subject,$msg,$null,$logfile) ; } $msg = "File $file has been transferred successfully" ; &update_report("$logfile","$msg",1,1,0) or &end_it($mail_msg,$to,$from,$subject,$msg,$text,$attachments) ;