1. Save the file as textappender.pl in the PERLSCRIPTS folder, then upload it to the perlscripts directory on the Web server.

    Set its permissions so that anyone can execute it.

    Here's what the relevant lines in this script do:
  • open(MYFILE,">>$myfile");

    Opens the the MYFILE variable (textthought.txt), then tells the Web server, with the >> sign, to add comments entered in textappender.html to textthought.txt.

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

    However, because MYFILE was opened for append (>>), the old text remains in texxthought.txt, and the new text is added to the end of it.

  • close(MYFILE);

    After MYFILE has been appended, it’s closed.