On 03/20/2007 05:21 PM, Vladimir Lemberg wrote:
Hi All,

My script is calling a Win32 program with two arguments:

system ( "$ARGV[0]\\program.exe", $File::Find::name, "$ARGV[0]\\source");

I want to capture STDOUT and STDERR from the program to log file

system ( "$ARGV[0]\\program.exe", $File::Find::name, "$ARGV[0]\\source", 
1>"$ARGV[0]\\log.txt", 2>&1 );
[...]

Even on a *nix system, this wouldn't work because redirection requires the shell, and the "system PROGRAM LIST" method of starting programs doesn't use the shell.

Look into IPC::Open3:
Start->Run->"perldoc IPC::Open3"

Get more information about Perl:
Start->Run->"perldoc perl"



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to