In the beginning of the perlscript put
I have an odd problem...
I have a perl script that execs another program:
$cmd = "motuds t1.dat t2.dat t3.dat > out1"; exec $cmd;
Motuds takes awhile to run, though, and I often want to see how it's doing:
% tail -f out1
The problem is, the output of motuds is not getting written out to the file immediately. Somehow it's getting cached somewhere, and only gets written out once in a while. If I type that command on the command line, the tail command works properly. So something with the exec process is causing the output to be buffered.
Does anyone happen to know why?
TIA.
- Bryan
$|=1;
That is the simplest way of stopping bufferring on STDOUT. ( For no bufferring on any other stream use select(HANDLE) ; $|=1 )
Or I think u could use some module like IO::File that has functions do that
Ram
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]