$dev="/cps";
for($i=1;$i<=$end;$i++) {
pgbegin(0,$dev,1,1);
pgenv($ra[$i]-0.05,$ra[$i]+0.05,$dec[$i]-0.05,$dec[$i]+0.05,1,0);
pglabel('RA (J2000)','dec. (J2000)',$name[$i]);
#plot stuff
pgend;
system "mv pgplot.ps $name[$i]_dist.ps"
}
Referring to the last line, how do you know for certain that pgplot.ps is being overwritten? If data is being appended to it each run, this could account for the increase in size. Rather than using a system call to move the placeholder file to its final destination, why don't you just directly write to that final destination? ($name[$i]_dist.ps)
Perhaps changing the system call to the following will help? (Granted, this is not an ideal solution.)
system "mv pgplot.ps $name[$i]_dist.ps && rm pgplot.ps";
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
|