On Thu, Nov 20, 2008 at 15:09, monnappa appaiah <[EMAIL PROTECTED]> wrote:
> Hi,
>
> As per you suggestion i removed the last line of the code and the
> replaced with the code, now the code looks like this
> --------------------------------------------------------------------------------------
>
> #!/usr/bin/perl -w
> use strict;
> use Net::SSH2;
>
> my $ssh2 = Net::SSH2->new();
> $ssh2->connect('sys5') or die "Unable to connect host $@ \n";
> $ssh2->auth_password('xyz','mypass');
> my $chan = $ssh2->channel();
> $chan->exec('ls -la');
> while (<$chan>) {print}
> my $buflen = 10000;
> my $buf1 = '0' x $buflen;
> $chan->read($buf1, $buflen);
> print "BUF1:\n", $buf1,"\n";
> ------------------------------------------------------------------------------
It looks to me like you did not remove the last line (i.e. the one
that says while (<$chan>) {print}).
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/