print MYFILE "$mycomments";
Puts, or “prints,” the text associated with the $mycomments variable (the text entered in the comments textbox in the form) into the file assigned to the MYFILE file variable—textthought.txt.
Since textthought.txt doesn’t exist yet, a new text file called textthought.txt is created to hold the text coming in from $mycomments.