I see you have turned on debugging, could you show us the output? Are you sure that $input_file and $new_file_name are defined? Use $ftp->message() to get the error message if the $ftp->put() fails.
$ftp->put($somefile, $some_other_file) || die $ftp->message(), "\n";