This is the source code and links for Chapter 2 of CGI Programming 101. The full text for this chapter may be found here.

Chapter 2: Perl Variables


Name Description
text.html Full Text for Chapter 2
scalar-cgi.html Print Scalar Variables Program (source code)
scalar.cgi Print Scalar Variables Program (example)
colors-cgi.html Print Hash Variables Program (source code)
colors.cgi Print Hash Variables Program (example)

Errata

Array Slices - on p. 18 and again in the reference on p. 26, the book says an array slice is $colors[1..2]. It should be @colors[1..2]. (@ refers to multiple values, $ is a single value.)