ok here is the problem. i have a limited amount of memory.
i need to open a large file (~600 megs). i have to open a filehandle, read
and process each line and write the output result into another file (which
soon grows to about 300 megs.
so,
open (IN, "averylargefile");
open (OUT, "anotherverylargefile");
while (<IN>){
chomp;
process line here....
write OUT ("$abcd\n");
}
close (IN);
close (OUT);
Now in order to ensure that all this remains within my quota, i need to
delete each line i have read from the input file after i have written my
processed output to the output file.
this reduction in input file size along with a simultaneous increase in the
output file size will ensure that i do not overshoot the quota.
does anyone have pointers on how to accomplish this in perl.
tia,
anjan
--
=============================
anjan purkayastha, phd
bioinformatics analyst
whitehead institute for biomedical research
nine cambridge center
cambridge, ma 02142
purkayas [at] wi [dot] mit [dot] edu
703.740.6939