if (!open(OUT,">$ufile"))
print OUT @NEW1;
close;
if (!open(OUT,">$ufile"))
print OUT @NEW2;
close;

同じファイルに出力しているようなのですが?・・・