use strict; use warnings; use diagnostics; open (DOG, ">not.txt") or die ("Cannot open not.txt"); print DOG "hello!"; close (DOG);