|Lesson 2|| Setting up environment |
|Objective|| Set up working environment with a Web server|
Setting up Perl Environment
If you do not already have a server running or access to a server's CGI directory,
this lesson will provide you with links to downloads for Web servers and recent versions of Perl.
Perl and the Web
Please keep in mind that this course is about Perl and CGI, not installing a Web server and/or new operating system.
Your objective is to obtain an understanding of how Perl is used with web programming.
Hence, perl is the binary and Perl is the language. The former parses and runs the latter:
perl parses and runs Perl and if someone writes PERL, you know immediately that they are not familiar with the Perl language.
This is why sometimes you see experienced programmers use PERL to refer to poorly written Perl programs.
Due to the wording of the original documentation that shipped with Perl, many programmers assume that PERL is an acronym for Practical Extraction and Report Language.
However perlfaq1, the documentation that shipped with Perl sets the record straight:
never write "PERL", because perl is not an acronym, apocryphal
folklore and post-facto expansions notwithstanding.
Remember, there is no such thing as PERL. It is Perl, the language, or perl, the executable.
Perl, Python, Ruby, and PHP are all examples of dynamic programming languages.
In contrast to languages such as Java, C++, and other static programming languages, the dynamic languages often delay certain things until run time that
static languages might decide at compile time, such as determining which class a method will dispatch to.
Dynamic languages tend to be rapid to develop in, but have certain kinds of errors that are less common in static languages.
Discussions about dynamic and static typing are about type theory, and the terms are poorly defined. However, there is one solid rule you should remember:
Computer scientists have reasonable disagreements about type theory, whereas computer programmers have unreasonable ones. If you get into "static
versus dynamic language" debates, and you do not understand type theory, you are
going to sound like a non-computer scientist to those who do.
In the next lesson, you will get a general overview of the role of CGI in the grand scheme of things, and the capabilities of a CGI program.