I THINK what is happening is that that form of open means your perl program and ssh share the same STDIN. And that ssh is the one flushing STDIN.
But i cant find a reference to this right now. I do know that if you didnt redirect STDOUT (and/or STDERR) your perl program and ssh share those two files as well
What might test that is open(H, "echo '' | ssh $_ 'uptime' 2>&1 |");. In that case the shell is redirecting the STDIN of ssh
edit:another way to test this theory (redirecting the STDIN of ssh) would be open(H, "ssh $_ 'uptime' </dev/null 2>&1 |");.
In reply to Re: Odd perl/ssh interaction
by huck
in thread Odd perl/ssh interaction
by mlf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |