$text = file1.txt open (DAT,">$text"); print DAT "$text\n" or die $!;