RE: SFTP Doubts
[email protected] ("Rajnikant")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
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();
if($!)
{
print (" Get failed ");
}
else
{
print ("Get succeed");
}
Does anyone see wrong in ths code?
~~~~~~~~~~~~~~~~~~~~
Thanks and Best regards,
~ Rajnikant
Software Engg.
Persistent Sys. Ltd.
Ph. +91 98222 04088
-----Original Message-----
From: Chas. Owens [mailto:[email protected]]
Sent: Tuesday, May 27, 2008 7:28 PM
To: Rajnikant
Cc: Jenda Krynicky; [email protected]
Subject: Re: SFTP Doubts
On Tue, May 27, 2008 at 9:29 AM, Rajnikant
<[email protected]> wrote:
snip
> if(!($sftp->get($remoteFilename,$localFilename)) ) {
> my $err = $sftp->status();
> print (" Get failed ");
> }
>
> What might be the reason behind this method failure?
snip
Any number of things. You might try looking at the return of $sftp->status:
$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.
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.