Hi all :

 I need to run a process for thousands of (known number) of
combinations  of the settings needed for the process to run. I have the
settings in different arrays & I am running the process as shown below
:  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 {

 Print STATUS " \n $counter iterations over \n";

}


Thanks.
Ravi


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

Reply via email to