my $success = $ftp->put($sub_log); if ($success) { print "FTP Put successful from server $ftp_server\n"; } else { # handle and report errors }