Both methods of IPC work, but it's a very good idea to stick with one consistent approach throughout your code. If you would prefer doing the whole thing with threads, I would refer you to
. I posted this question when I was learning threads in Perl, including message passing concepts. Since you are worried about blocking operations, you can maintain your fork/pipe approach and use
to facilitate a timeout on the connection. There are also a number of IPC-modules on
that may help.