in reply to 2 way pipe?

have you looked at IPC::Open2 ? from the perldoc:
DESCRIPTION The open2() function runs the given $cmd and connects $rdrfh for re +ading and $wtrfh for writing. It's what you think should work when y +ou try $pid = open(HANDLE, "|cmd args|");