Re: SFTP Doubts

[email protected] ("Chas. Owens")
Newsgroups perl.beginners
Message-ID <[email protected]>
On Tue, May 27, 2008 at 10:36 AM, Rajnikant
<[email protected]> wrote:
> Thanks again :).
>
> I thought of same solution but did not find any similar code snipet on web.
> So I was not confident about same :(. Following is the code snipet:
>
> sftp->get($remoteFilename,$localFilename);
> $sftp->status();
snip
> Does anyone see wrong in ths code?
snip

Yes, you are still not looking at the return value of $sftp->status.
You need to print the status when an error occurs to see what the
error was:

sftp->get($remoteFilename,$localFilename) or warn $sftp->status;

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.