I'd also suggest the IPC:: modules. For example, if you want to control the input and output of another program, try something like this (Perl Cookbook, pg. 567):
use IPC::Open2;
open2(*README, *WRITEME, $program)
print WRITEME "here's your input\n";
$output = <README>;
close(WRITEME);
close(README);