in reply to Re: Setting up 2 way pipe for a command
in thread Setting up 2 way pipe for a command

Thanks for the suggestion. I may have to switch to IPC::Run as I cannot get open2 to work. It seems to block when I try to read the output. I tried setting autoflush for the output but it doesn't seem to help. I should make it clear that I am trying to make this interactive so I need the output for each input (if there is one) while the command is running. I believe there is a 1:1 correspondence between a line into the command and a line out. The line in does what it is supposed to but at that point the script hangs waiting for a line on the output side so the next input line never goes. However, it is possible that there is not a 1:1 correspondence but until I can manage the blocking I won't really know. It appears like pump might do what I need but I have to read up on it more and see some examples.
  • Comment on Re^2: Setting up 2 way pipe for a command