Loading ...
Sorry, an error occurred while loading the content.

why this is not working ??

Expand Messages
  • T.S.Ravi Shankar
    Hi all : I am running a process n number of times with a for loop. I am interested in looking for the status at specific intervals(say at every 10
    Message 1 of 1 , Aug 26, 2003
    • 0 Attachment
      Hi all :

      I am running a process "n" number of times with a for loop. I am
      interested in looking for the status at specific intervals(say at every
      10 iterations). I wrote the below shown code for this purpose but
      without success :

      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 ??

      Thanks,
      Ravi
    Your message has been successfully submitted and would be delivered to recipients shortly.