You do know about open("-|") and open("|-"), don't you?
However, I don't like to pipe data through real pipes between processes. I rather like real coroutines that pass values to each other, not just text through a pipe.
Perl is not really good in this,
because it doesn't have continuations and coroutines,
and it's very difficult to add them to the perl core now.
If you want that, you can use one of
- python which has coroutines and transparent lazy lists based on them,
- perl6 which will have them too but it's not ready yet,
- scheme has continuations built in, and some scheme implementations and libraries have even more support
- ruby, which has a callback-based iterator modell in its core classes; but also continuations and some libraries based on it
- lua which has coroutines