in reply to ftp put without a local file

You are close, but you have to print the data into the filehandle first. The following would work, were it not for the fact Net::FTP hangs while putting (not like there is alot of choice).
### i know this does not work, i am showing the idea my $ftp = Net::FTP->new($server,$user,$pass); $ftp->cwd("/some/dir"); pipe(R,W); $ftp->put(\*R,'filename'); print W "data here\n"; $ftp->quit;
So, the other way is to fork a process and have it do the writting into W. Like the following (untested code ahead) :
pipe(READ,WRITE); $pid = fork(); if ($pid == 0) { ## child (read) close(WRITE); $ftp->cwd("/some/dir"); $ftp->put(\*READ,'filename'); $ftp->quit; } else { ## parent (write) close(READ); ## ... do some cool processing for $data print WRITE $data; close(WRITE); }
... i have not tested this, but it should work. I guess if you are on unix you could also use mknod to make a named pipe, and use that.
can't sleep clowns will eat me
-- MZSanford