D
Dave...
I'm using Perl on a windows machine to automate Visual Studio .NET C++
builds each day. The command I run is the VS commandline program
devenv.exe which outputs log and error information to the console if
run directly on the commandline. For some reason I am unable to
capture or redirect this output to the console when I run the command
from Perl until the entire build is complete. Using system() I get no
ouput at all so I tried the following...
$|=1;
open(COMPILELOG, "$devenvcommand |");
while( <COMPILELOG> )
{
print;
}
close(COMPILELOG);
This does capture the output, but doesn't print it out until the
entire build is completed instead of outputing during the build. I
also tried adding 2>&1 to the command but it did not help.
Is there a way to output in real time the way it works on the
commandline or could someone explain to me why it cannot be done?
Dave...
builds each day. The command I run is the VS commandline program
devenv.exe which outputs log and error information to the console if
run directly on the commandline. For some reason I am unable to
capture or redirect this output to the console when I run the command
from Perl until the entire build is complete. Using system() I get no
ouput at all so I tried the following...
$|=1;
open(COMPILELOG, "$devenvcommand |");
while( <COMPILELOG> )
{
print;
}
close(COMPILELOG);
This does capture the output, but doesn't print it out until the
entire build is completed instead of outputing during the build. I
also tried adding 2>&1 to the command but it did not help.
Is there a way to output in real time the way it works on the
commandline or could someone explain to me why it cannot be done?
Dave...