in reply to Controlling input and output of different program
Why?
Error checking?
perlipc has examples , although I'd avoid interactive CLI programs like this ... eew ;)