Do you know where your variables are? | |
PerlMonks |
Re: Net::SFTP Helpby mikedshelton (Beadle) |
on Dec 21, 2003 at 02:31 UTC ( [id://316126]=note: print w/replies, xml ) | Need 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
In Section
Seekers of Perl Wisdom
|
|