gsp has asked for the wisdom of the Perl Monks concerning the following question:

use Net::SFTP; my $sftp=Net::SFTP->new('abcdef.ud.com',user=>'abcde',password=>'12345 +678',debug=>1); print "Logged in..."; sftp->cwd('SUBFOLDER'); print "changed directory..."; sftp->put('file.txt'); print "putting file"; sftp->quit;

Error Message Via Debugger:

#ERROR Message Starts

shappzu2: Login completed, opening dummy shell channel.

shappzu2: channel 0: new client-session

shappzu2: Requesting channel_open for channel 0.

shappzu2: channel 0: open confirm rwindow 100000 rmax 16384

shappzu2: Got channel open confirmation, requesting shell.

shappzu2: Requesting service shell on channel 0.

shappzu2: channel 1: new client-session

shappzu2: Requesting channel_open for channel 1.

shappzu2: sftp: Sending SSH2_FXP_INIT

Use of uninitialized value in numeric gt (>) at /apps/equity/SPIT-3rdParty/perl/5.6.1/site_perl/5.6.1/Net/SSH/Perl/Channel.pm line 82.

Use of uninitialized value in pack at /apps/equity/SPIT-3rdParty/perl/5.6.1/site_perl/5.6.1/Net/SSH/Perl/Buffer.pm line 105.

Connection closed at sftptest.pl line 2

#ERROR Message Ends

I'm using Net::SFTP 0.07 version

Link to SFTP module I was using

http://cpansearch.perl.org/src/DROLSKY/Net-SFTP-0.07/lib/Net/SFTP.pm

Could anyone help me on how to resolve this issue?

Replies are listed 'Best First'.
Re: Net::SFTP : use of uninitialized value at pack Buffer.pm line 105 (source)
by tye (Sage) on Apr 14, 2014 at 03:04 UTC

    The source code of those modules should be able to help you. Did you look at the two lines that emitted those errors? Did you search for places that call those two routines? Did you consider just using "perl -d", the Perl debugger, to stop at the point when the warning happens and then see what the call stack looks like?

    - tye        

Re: Net::SFTP : use of uninitialized value at pack Buffer.pm line 105
by salva (Canon) on Apr 14, 2014 at 06:34 UTC