Ok, I see your point. You want to read the output as it's happening?
Unfortunately, it seems like the ActiveState version of Perl does not accept file redirection. You could download and install Cygwin along with it's distribution of perl. Then you would be able to run the following script which would probably do what you want.
# Execute program and put it in the background.
system("program > out.txt &");
# Wait for file to be created otherwise this will fail.
sleep 3;
open(IFILE,"<out.txt") or die "Couldn't open file. $!\n";
# Keep reading until nothing more to read.
while (<IFILE>)
{
# Do something with output.
print "$_\n";
}
close(IFILE);
metadoktor
"The doktor is in." |