I wonder if you are confusing anonymous pipes (indicated by the | symbol) and named pipes?
I started to think the very same thing after I posted my reply. It seems likely that's what the OP meant. Another point to keep in mind, you can create anonymous pipes using the pipe function, too. You don't have to use Perl's forking-pipe open call (though, I admit, it is very convenient).
| [reply] |
The reason I've done the "open" with the anonymous pipe is to enable the parent to get output from the child.
The crux here is that the read from the named pipe my $this_line = <FIFO> could potential block indefinitely. That is why it is nessary (AFAIK) to fork (create the child) and have a timeout which kills the child if it does not manage to read from the pipe. | [reply] [d/l] |