open (FILEHANDLE, ">data.txt") or die ("Cannot open data.txt"); print FILEHANDLE "Hello\nthere!"; close (FILEHANDLE);