Just tried again to reproduce your error.
First, I am getting the same result (nothing read), if I set the timeout in the select-function too low, say
#select(undef,undef,undef,0.2);
select(undef,undef,undef,0.001);
Maybe You should try a higher one?
Second, it seems, that readline (or <>) is always able to read from the channel (no select necessary).
The below code works for me. For you too?
my $chan = $ssh->channel() or die "create channel:$!\n";
$chan->shell() or die("open shell: $!\n");
$chan->blocking(0);
$chan->write("ls\n") or die("write to channel: $!\n"); while ( <$chan>
+ ) {
print $_;
}
|