• 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.

  • close(MYFILE);

    The close command tells the Web server that you’re done using the MYFILE file variable.

  1. Upload textwriter.pl to the perlscripts directory on the Web server, then set its permissions so that anyone can execute it.
  2. In the browser, go to:

    www.yourwebsite.com/textwriter.html