• 0

perl pipelining help


Question

I know I can say open(PIPE, "| command1 | command2") and it will setup a pipeline where STDOUT of command1 will go to STDIN of command2.

However, in my case, I don't want to stream anything to command1, as all of its data comes from a flat file on disk. Instead, I want to call it as a command, and then have it pipe data to command2. Is there any easy way to do that from an outside script?

When I open a pipe, to say, command1, does command1 execute and then wait for STDIN to deliver? What state does it stay in in the interim?

When I have a pipeline, are the STDOUTs of the different segments buffered or does it just move down the pipe line by line?

Thanks for any help.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.