On Wed, 27 Aug 2003 11:18:26 +0530, [EMAIL PROTECTED] (T.S.Ravi
Shankar) wrote:
>
>open(STATUS,">> status.txt");
>for ($i=0; $i<=98985;$i++) {
>  system ("process");
>  if (($i%10)==0) 
>    { print STATUS "\n\n **** $i iterations over !!*****\n\n"; }
>  }
>close(STATUS);
>
>---------------------
>
>"status.txt"  remains empty when the processes are run & the whole file
>is written only at the end of all iterations, which serves no purpose !!
>
>Could you please help me out in solving this problem ??

Turn off buffering!.
Look at this script to demonstrate.
#########################################################
#!/usr/bin/perl
#without a newline, it won't print 
#until the buffer is 2k 

#$|=1;  # try it with and without this line :-) 

while (1){
print 'aaaaaa';
select(undef,undef,undef,.03);
}
#######################################################


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to