Think about Loose Coupling | |
PerlMonks |
Re^2: Long Process Waits Until End to Display Resultsby C_T (Scribe) |
on Dec 07, 2004 at 18:26 UTC ( [id://412965]=note: print w/replies, xml ) | Need Help?? |
make sure whenever your actually print the output that $| is set to a true value.
I have done this. Like you, this is something I used in most of my scripts. Second, it could be in the $my_long_process program. Many programs, and the default stdio library, buffer output unless it's to a tty. If that's the case with $my_long_process program, it wouldn't buffer output when you ran it from the command-line (because it was connected to a tty), but would when run from your program. You might be able to test by running: $my_long_program |cat It still gave me real-time feedback when run piped into cat as you suggested. CT
Charles Thomas Madison, WI
In Section
Seekers of Perl Wisdom
|
|