in reply to Net::SFTP Help

Sebaw, Have you taken a look at my Net::SFTP send file program in the following node Seek Critique of SFTP program, format, structure, overall "Perl"ness ?

It is a fully functional program. While there are improvements to be made, I think you will find it very helpful.

BTW $sftp->put() and $sftp-get() don't return a status for success / failure (I have submitted a bug on rt.cpan.org) like $sftp-new() does. It is necessary that you eval{} and catch{} the results (see main{}).

Earlier this week I found that SFTP does not have a timeout default like FTP... you will need to roll your own alarm to handle this no-repsonse from host (bug reported) - refer to my posting ??? proper use of $SIG{ALRM} with SFTP ???.

The suggestion about testing sftp'ing a file manually and keeping track of all your steps is a good one. This was my MO during testing. You will notice there are many checks in my send program, including those dealing with source directory / file existance and permissions.

I also have a retrieve program that I will be posting in the near future for reference (doesn't hurt to share the knowledge)

Thanks PerlMonks.com for letting me help others as I have been helped.

mikedshelton