Re: Getting error in Net::SFTP with get function

2007-11-01 Thread Paul Lalli
On Nov 1, 9:10 am, [EMAIL PROTECTED] (Jay Savage) wrote: > That's back to the whole void business. In a void context, it should > return the empty string on success, and undef on failure. In any other > context, it should return the file contents on success. Clearly, I was > confused about the cont

Re: Getting error in Net::SFTP with get function

2007-11-01 Thread Jenda Krynicky
From: Jeff Pang <[EMAIL PROTECTED]> > This discussion let me think a thing that, one of my co-workers, who > is good at both C and perl programming. When coding with Perl, he > always like to put a 'return 0' on the end of each subroutines (maybe > learn the habit from C?). So for

Re: Getting error in Net::SFTP with get function

2007-11-01 Thread Jay Savage
On 10/31/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: [snip] > The docs could always be more clear. The right operand of an > or-operator does inherit the context of the operator itself. But the > left operand's context is always Boolean. > Thanks for clearing that up! > > Given that, I would expec

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Jeff Pang
st >Subject: Re: Getting error in Net::SFTP with get function > >On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote: > >> it looks to me like OP is calling $sftp->get() in a void >> context: >> >> $sftp->get( $file, $localFile ) || warn("errr

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Tom Phoenix
On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote: > it looks to me like OP is calling $sftp->get() in a void > context: > > $sftp->get( $file, $localFile ) || warn("er0r_---> > $!".$sftp->status."\n"); It may seem that way, but the left side of the logical or operator isn't a void co

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Rob Dixon
Jay Savage wrote: On 10/31/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote: Take another look at the Net::SFTP docs, particularly the note about what get() does when called in a void context. I see a note about a non-void context, but I don't see o

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Jay Savage
On 10/31/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: > On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote: > > > Take another look at the Net::SFTP docs, particularly the note about > > what get() does when called in a void context. > > I see a note about a non-void context, but I don't see one about

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Paul Lalli
On Oct 31, 11:15 am, [EMAIL PROTECTED] (Tom Phoenix) wrote: > On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote: > > > Take another look at the Net::SFTP docs, particularly the note about > > what get() does when called in a void context. > > I see a note about a non-void context, but I don't see o

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Tom Phoenix
On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote: > Take another look at the Net::SFTP docs, particularly the note about > what get() does when called in a void context. I see a note about a non-void context, but I don't see one about a void context. The OP didn't use the get() method in a void

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Jay Savage
On 10/31/07, kilaru rajeev <[EMAIL PROTECTED]> wrote: > Hi All, > > I have the following code as part of my program; > > print "---=> $file, $localFile\n"; > $sftp -> get( $file, $localFile ) || warn("er0r > _---> $!".$sftp->status."\n");^M > > Even though it has do

Re: Getting error in Net::SFTP with get function

2007-10-31 Thread Jeff Pang
-Original Message- >From: kilaru rajeev <[EMAIL PROTECTED]> >$sftp -> get( $file, $localFile ) || warn("er0r >_---> $!".$sftp->status."\n");^M > >Even though it has downloaded the file properly, it is giving the following >message: > >---=> /trading/tiscrd

Getting error in Net::SFTP with get function

2007-10-31 Thread kilaru rajeev
Hi All, I have the following code as part of my program; print "---=> $file, $localFile\n"; $sftp -> get( $file, $localFile ) || warn("er0r _---> $!".$sftp->status."\n");^M Even though it has downloaded the file properly, it is giving the following message: ---=