in reply to Writing to an SSH channel

I haven't used this exact module. I am curious about this:  $chan->blocking(1) ; You want a non-blocking read that returns immediately if no data is available to be read. Maybe this flag is wrong? Update: I'll need to study this a bit more - it been a while since I've done such things. You may also need some kind of a flush to get the write to happen. I think this is more involved than my first impression.

Replies are listed 'Best First'.
Re^2: Writing to an SSH channel
by BernieC (Pilgrim) on Sep 18, 2018 at 23:51 UTC
    I managed to fix the problem. As I pondered it over dinner, I thought about the mysterious send_eof() and it did the trick: now the program works just fine. A $chan->send_eof() and it all seems to work..
      Sounds like "You may also need some kind of a flush to get the write to happen." Worked by sending eof! FANTASTIC!