in reply to ftp put without a local file

Another option is using the forking open

# Your normal code goes here if (open(SESAME, "-|")) { # parent process $ftp->put( \*SESAME ,"ftptest"); $ftp->quit; } else { # child process does all the printing print STDOUT "Whatever you like to print"; exit; }
This should work but is untested ...

Update: Fixed passing of filehandle as suggested by runrig.

-- Hofmator