open (DAT, ">file.txt") or die "Can't open file.txt: $!\n";