in reply to
Automate program interaction
maybe you should take a look at
perldoc perlopentut
the paragraphs on pipe opens might contain some of the answers you're looking for.
Comment on
Re: Automate program interaction
Download
Code
In Section
Seekers of Perl Wisdom