http://www.perlmonks.org?node_id=1001324


in reply to Unable to store the command output from Net::SSH2. Please help.

Based on what works for me on Windows (connecting to a linux server) you should be able to do:
my @output; $chan->blocking(1); $chan->exec('nas_server -list'); while (<$chan>) {push @output, $_} print for @output;
Cheers,
Rob
  • Comment on Re: Unable to store the command output from Net::SSH2. Please help.
  • Download Code