in reply to How to redirect STDIN and STDOUT to the particular perl script
This node may also be of interest:
Safe cross-platform command execution and capture of STDOUT & STDERR
HTH,