On Tue, 26 Aug 2003 23:35:52 +0530, [EMAIL PROTECTED] (T.S.Ravi
Shankar) wrote:
>: I would like to see the status after every 50 runs in a separate
>file. But the following code doesn't look like outputting any thing to
>the statusfile, when the processes are going on for different
>combinations. How can I achieve that ??? What mistakes I am committing
>here ??
>
>
>open(STATUS,">statusfile")
>foreach $set1 (@arr1) {
>foreach $set2 (@arr2) {
>..
>..
>foreach $set15 (@arr15) {
>ENV{"xxx"} = $set1;
>..
>.
>ENV{"ccc"} = $set15;
>$counter++; # counter for the number of combinations
>if (($counter % 50) ==0) { &genstatus; }
>$pid = fork;
>if($pid == 0) {
> exec("PROCESS");
>}else{
> $pid1=wait;
>}
>sub genstatus {
$|=1;
> Print STATUS " \n $counter iterations over \n";
>}
Maybe your output needs to be unbuffered?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]