in reply to Perl Net::SSH2 on Window

Don't set non-blocking mode.

Instead, read lines until you get the shell prompt back. For instance:

my $channel = $ssh->channel(); $channel->shell(); print $channel "term len 0\n"; while (<$channel>) { last if /^>$/; push @junk, $_; }