open(IN, ">data.txt") or die $!; print @array IN ,"\n"; close IN;