Breaking down the code,
an introduction to Perl.
print "Content-type: text/html\n\n";
The first line of every CGI in Unix is the path to the program which
it. Remember, yours may be different because you substitued the path
to Perl on your machine. The server will follow that path, locate Perl,
and then use the Perl interpreter to execute the program. This is
the only line which begins with a hash mark (#) and has some meaning to
the program. Throughout the remainder of the program, the # symbol
is a comment, and the program will disregard anything which follows
The third line is one command, &readparse; .
down below the body, which imports all of the text entered in the HTML
The fourth line is required for all CGI programs. It tells the
server that anything we choose to print should be returned as an HTML document.
These lines will never change, so from now on we will only focus on
the contents of the BODY section.