in reply to Dup & redirecting filehandles

A stock open call should be able to do most of the simple stuff natively. Where you get into things like bi-directional file handles, etc., you will want to either use fork in conjunction with, say, pipe or socketpair. Alternatively, you can use open2 or open3 to get open-style functionality with multiple file handles (stdout, stdin and optionally stderr).

You should give perlipc a read. Lots of interesting documentation and examples about communicating between processes, which is effectively the functionality you'll need to use here. Good luck.