fsn has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to send some information from one machine to another using ftp, in a BigBrother setting. Now, I really don't have a local file. I guess I could write the information I wan't to send to a local file, upload it and then delete the local file, but that seems unnecessary to me.
I would like to do something like:
use Net::FTP;
$ftp = Net::FTP->new("myhost", Debug => 0);
$ftp->login("user","pwd");
$ftp->cwd("/just/a/directory");
$ftp->put( <SESAME> ,"ftptest");
print SESAME "This is a test.\n";
$ftp->quit;
but that doesn't work for obvious reasons. Any suggestion what I should do? In the man-page it says that the first argument to put() can be a file handle, but how do I use it?
Kind and humble regards,
fsn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ftp put without a local file
by wog (Curate) on Aug 31, 2001 at 18:57 UTC | |
|
Re: ftp put without a local file
by suaveant (Parson) on Aug 31, 2001 at 18:56 UTC | |
|
Re: ftp put without a local file
by Hofmator (Curate) on Aug 31, 2001 at 19:07 UTC | |
|
Re: ftp put without a local file
by MZSanford (Curate) on Aug 31, 2001 at 19:55 UTC | |
|
Re: ftp put without a local file
by runrig (Abbot) on Aug 31, 2001 at 19:50 UTC |