Re: Getting error in Net::SFTP with get function
- From: daggerquill@xxxxxxxxx (Jay Savage)
- Date: Wed, 31 Oct 2007 11:09:05 -0400
On 10/31/07, kilaru rajeev <kilarurajeev@xxxxxxxxx> wrote:
Hi All,
I have the following code as part of my program;
print "---=========> $file, $localFile\n";
$sftp -> get( $file, $localFile ) || warn("errrrr0rrrrr
_---> $!".$sftp->status."\n");^M
Even though it has downloaded the file properly, it is giving the following
message:
---=========> /trading/tiscrdenhlist10310000.txt.old,
/export/home/crdadm/rajeev/tiscrdenhlist10310000.txt
errrrr0rrrrr _---> 0
Please let me know why it is give the error message.
Rajeev,
Take another look at the Net::SFTP docs, particularly the note about
what get() does when called in a void context. Use $sftp->status, not
the return value of get(), to check for errors.
Best,
-- jay
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!
- Follow-Ups:
- Re: Getting error in Net::SFTP with get function
- From: Tom Phoenix
- Re: Getting error in Net::SFTP with get function
- References:
- Getting error in Net::SFTP with get function
- From: Kilaru Rajeev
- Getting error in Net::SFTP with get function
- Prev by Date: Re: errror while installing DBD::MYSQL.
- Next by Date: Re: Getting error in Net::SFTP with get function
- Previous by thread: Getting error in Net::SFTP with get function
- Next by thread: Re: Getting error in Net::SFTP with get function
- Index(es):
Relevant Pages
|