Even if you can't directly do an FTP put from the <DATA> filehandle, you can write <DATA> to a real file, then put that file.
# Completely untested :( use Net::FTP; use File::Temp qw(tempfile); my ($fh, $filename) = tempfile( DIR => '/' ); print $fh <DATA>; close $fh; ... set up your $ftp connection ... $ftp->put($filename); $ftp->quit; unlink $filename;
In reply to Re: Net::FTP Question
by Util
in thread "Compile" Net::FTP upload script and use __DATA__ ?
by OverlordQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |