• print "$line
    \n";

    Prints the text in each line of textthought.txt as the script loops through them.

  • close (THISFILE);

    Once the foreach loop is finished, the file variable that stands for textthought.txt file is closed.

  1. In the browser, go to:

    www.yourwebsite.com/cgi-bin/perlscripts/textviewer.pl

    The output should look something like this: