On 8/27/07, Mihir Kamdar <[EMAIL PROTECTED]> wrote: > Hi Chas, > > It works...but the problem I have is that some of the records are totally > lost. And also the output file keeps on writing multiple times and grows > into a huge size. almost 10 times, it keeps on growing until I kill the > script. > > I checked few of the records which have calculated properly and giving me > the desired result, while the others are totally lost in the output. Check > my code after closing the file. Is it the culprit? > > close $IN_FILE ; > > open (my > $OUT_FILE,">>","$write_path/$file.out") or die $!; > > while (my($key, $value) = each %hash) > { > print $OUT_FILE $value; > } > close $OUT_FILE ; > } > } > closedir $dh ; > } > > > Thanks.. >
It looks like you aren't moving or deleting the files you have already processed, so you are processing them over and over again. You should consider renaming the files or creating a list of already processed files (remember to store the list to a file and to reread the list on start up). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/