There are 3 reasons why your script might not have executed.

If you got a message stating that 'An Error has Occurred'
Your CGI tried to execute, but the code has a flaw in it.  Return to the Unix prompt (still in the perltour directory), and type perl test1.cgi and press [ENTER].  The Perl debugger will tell you what is wrong.  Check for a semicolon at the end of each line.  Double check the path to Perl and Sendmail. Also, if you pasted the code from the web page, be sure there are no spaces at the beginnig of a line.

If you got a message stating that 'Access is Forbidden' or 'Permission Denied'
You need to set the permissions of both the file and the cgi-bin folder.
At the Unix prompt (still in the perltour directory) type chmod a+rx test1.cgi and press [ENTER].
Then type cd .. and press [ENTER] to go up one level, and type chmod a+rx perltour and press [ENTER]
This should fix it.

If the script appeared on your screen
The server is not recognizing that this is a cgi script.  You should contact your system administrator and ask "What is the appropriate location for cgi scripts?"  There may be a specific directory already created on the server called 'cgi-bin' which must contain all CGI scripts.  If you are told that CGI scripts are not allowed, or that someone else must copy them into the cgi-bin before you can use them, you need to get an account somewhere else.  I recommend  They are only $100 per year, and they give you full access run any script, in any folder, as long as it ends with .cgi.  Also, this is the server I use, so the template examples are guaranteed to work.

To locate the cgi-bin directory on your machine you will use the find command.  The find command will start with any directory you specify and search the contents of everything beneath it.