in reply to Open2 and ssh problem

That works for my on a Windows XP virtual machine:
use IPC::Open2; my ($read, $write); my $pid = open2($read, $write, 'ssh -vv 10.0.2.3 -l salva'); syswrite $write, "ls && exit\n"; close $write; while (1) { my $buf; sysread($read, $buf, 1) > 0 or last; print $buf; } close $read; waitpid $pid, 0;
Cygwin/OpenSSH do very scary things to simulate non-blocking pipes on Windows and sometimes they behave in unexpected ways!