in reply to Call external exe
Have a look @ Section 16 of the Perl Cookbook - there are recipes in there that use IPC::Open3 to control input/output to/from another program.
HTH ,