This problem is trickier than it sounds, at least to me, so please, no "@outPut=`myScript.pl 2&>1`;" type suggestions 
All I want is to run my program, say counting.pl, from within another perl script so that the user sees the output:
1
2
3
.
.
.
as it occurs. I also want to save the output to write a file for later viewing.
I know! Simple! But although backticks return output, I can't force them to also write to STDOUT as the program runs. Various versions of "open" refuse to make a peep until it's all over. "System" puts everything to the screen but I can't figure out a way to capture it.
There are lots of suggestions in the books and online but most of them seem to ignore the unholy Win32 universe, which is what our clients are using. They promise what I want but none of the examples work. I'm about to give up and just them a choice of screen output or report generation but it seems like a weaselly thing to have to do.
Any suggestions?
All I want is to run my program, say counting.pl, from within another perl script so that the user sees the output:
1
2
3
.
.
.
as it occurs. I also want to save the output to write a file for later viewing.
I know! Simple! But although backticks return output, I can't force them to also write to STDOUT as the program runs. Various versions of "open" refuse to make a peep until it's all over. "System" puts everything to the screen but I can't figure out a way to capture it.
There are lots of suggestions in the books and online but most of them seem to ignore the unholy Win32 universe, which is what our clients are using. They promise what I want but none of the examples work. I'm about to give up and just them a choice of screen output or report generation but it seems like a weaselly thing to have to do.
Any suggestions?