The rest of this introductory Perl course will describe how
you can make Perl interact with a browser through the Common Gateway
Interface, or CGI.
CGI is a standard interface that sits
between the web browser and the web server. When the browser makes a request
of the server, all of the request details flow into the server through the
input interface of the CGI. When the server responds with its output, the
information flows back out through the output interface of the CGI.
When Perl responds to a browser request it sends output to
STDOUT which is sent through CGI back to the browser. Because you know how
to print data to STDOUT, you can already work with CGI at its most basic
level: sending data to it. It is no more complicated than printing to
The real challenges are learning how to interact
with the data that comes in, and how to create useful content. We will learn
this later, but for now, we will start by printing some very simple text to
a browser window.