Hello all,
Has any body done this/know how to dit/know if it's even possible??
 
 
__SHORT VERSION__
How do I / Is it possible to -- use Net::FTP to send a file to a remote server that 
isn't an actual file but rather a variable with the file's contents?
 
EG :: 
$ftp->("$html_code","newfile.html"); # where $html_code actually holds html code 
instead of a filename or filehandle
 
__LONGER VERSION__
 
I had a similar situation with Mail::Sender before now I need to do the same thing 
with Net::FTP or a different module if this one can't do it :
 
I need to ftp files to a remote server.
Say they need to be named file.html and file.pdf.
 
Here's the kicker ::
 
both files' contents are not found in any file, rather they are generated by the 
script and stored in variables :
 
EG - 
 
my $html_file_contents = "<html><body>Hello World</body></html>";
my $pdf_file_contents = creat_pdf_version("$html_code_contents");
 
This would let you do ::
 
print "Content-type text/html\n\n";
print $html_file_contents;
 
or
 
print "Content-type application/pdf\n\n";
print $pdf_file_contents;
 
and in the browser it would look right.
 
I have also used the ever so handy Mail::Sender to use these variables and send them 
as file attachments as if they actually existed before.
 
Any ideas/different modules/etc..
 
Thanks a bunch
 
Dan
 
 
 


Reply via email to