Thread

Posted on Mon Jul 3 19:51:06 2006 by blankt
Net::SSH2::SFTP example code
Please, can anyone give me an example code for sftp's open, ...read and ...write functions? Im not able to figure out how to use them...
By the way, to create a file on remote host, that does NOT exist, I use:
$sftp->open("myfile.tmp", O_RDWR | O_CREATE) or die "open failed: ($!) (", $s2->error, ") (", $sftp +->error, ")\n";
but script fails with:
open failed: (Resource temporarily unavailable) (-31LIBSSH2_ERROR_SFTP_PROTOCOLFailed opening remot +e file) (2SSH_FX_NO_SUCH_FILE)
What's the problem here?

Thanks for your answers
Direct Responses: 2610 | Write a response
Posted on Tue Jul 11 13:33:53 2006 by blankt in response to 2572
Re: Net::SSH2::SFTP example code
Ok, I've found the "problem": use strict lead me to the mistake. I forgot to "use IO::File"... Damn
Write a response