search for books and compare prices
Tables of Contents for The Web Wizard's Guide to Perl and Cgi
Chapter/Section Title
Page #
Page Count
Preface
ix
 
Introduction
1
12
Some Background Information on the World Wide Web
2
1
How a Browser Accesses HTML Files over the Internet
2
3
HTML and Web Pages
2
2
Status versus Dynamic Web Pages
4
1
Web Application Programs
4
1
The Common Gateway Interface
5
1
How Browsers and Web Applications Work with CGI
5
1
An Interface with Different Programming Languages
6
1
The Perl Programming Language
6
7
Explaining Perl's Popularity for CGI Applications
7
1
Getting Started
7
4
Summary
11
1
Online References
11
1
Review Questions
11
1
Hands-On Exercises
12
1
Getting Started
13
24
Is Your Web Server Account Ready to Go?
14
6
Do You Have the Necessary Telnet or FTP Software?
14
1
Getting Connected with Telnet and FTP
14
3
Are the Required Directories Set Up Correctly?
17
3
Where Is Perl?
20
1
Starting Your Program Development Process
21
7
Create You Program File
22
2
Change the Program's Permissions
24
2
Check and Correct Your Program's Syntax
26
2
Running Your Program
28
9
Running Your Program Directly on the Web Server or PC without a Browser
29
1
Getting Ready to Run Your Program over the Internet
30
1
Running Your Program over the Internet
31
1
Dealing with Problems
31
1
Generating HTML Statements from Perl Programs
32
2
Summary
34
1
Online References
34
1
Review Questions
35
1
Hands-On Exercises
35
2
The Perl Basics
37
30
Using Scalar Variables
38
2
Combing Variables and the print Statement
39
1
Operating on Variables
40
6
Writing Complex Expressions
42
1
More on Mixing Variables with HTML Output
43
1
String Variables
44
2
Conditional Statements
46
8
The if Statement
47
4
The elseif Clause
51
2
The else Clause
53
1
Using Perl Functions
54
13
Basic Perl Functions
55
2
The print Function
57
1
The param Function
58
2
Sending Arguments to Your Web Pages
60
3
Summary
63
1
Online References
63
1
Review Questions
64
1
Hands-On Exercises
64
3
Working with the Web
67
28
Generating HTML Documents with CGI.pm
68
8
The Basic Formats of CGI.pm Functions
69
7
Getting Input Data from HTML Forms
76
13
Starting and Ending Forms
76
1
Form Buttons
77
1
Setting Up Input Text Areas
78
3
Sending Passwords
81
2
Text Areas
83
1
Check Boxes
84
2
Radio Buttons
86
1
Selection Lists
86
2
Hidden Fields
88
1
Testing Input Using CGI.pm Debug Mode
89
6
Summary
91
1
Online References
91
1
Review Questions
91
1
Hands-On Exercises
91
4
List Variables and Loops
95
28
List Variables (Arrays)
96
12
Creating List Variables
96
1
Referencing List Items
97
3
Outputting the Entire List Variable
100
1
Getting the Number of Elements in a List Variable
100
2
Adding and Removing Items from a List
102
1
Extracting Multiple Values from a List
103
3
Using Lists of Lists
106
2
Looping Statements
108
9
The for Loop
109
3
The foreach Loop
112
2
The while Loop
114
2
The until Loop
116
1
Creating Compound Conditionals
117
6
Summary
120
1
Online References
120
1
Hands-On Exercises
121
2
Hash Lists and Subroutines
123
30
Hash Lists
124
13
Using Hash Lists
124
3
Accessing and Outputting Hash Keys and Values
127
1
Changing, Adding, Deleting, and Verifying Hash List Items
128
2
Environmental Hash Lists
130
1
Checking Language with Environmental Variables
131
2
Creating a Hash List of List Items
133
2
Adding and Deleting Items from a Hash Table
135
2
Using Subroutines
137
16
Working with Subroutines
138
2
Passing Arguments to Subroutines
140
1
Returning Values
141
3
Using Return Values to Combine Program Files
144
2
Using Subroutines in External Files
146
3
Summary
149
1
Online References
149
1
Hands-On Exercises
150
3
Matching Patterns and Files
153
34
Working with Patterns in String Variables
154
16
The Match Operator
154
1
The Substitution Operator
155
1
A Full Pattern Matching Example
156
2
Using Regular Expressions to Match Patterns
158
4
Special Character Classes
162
1
Setting Specific Patterns with Quantifiers
163
1
Building Regular Expressions That Work
164
3
The Split Function
167
3
Working with Files
170
17
Using the open() Function
170
2
Using the File Handle to Read Files
172
3
Specifying Filenames
175
1
Writing to Files
176
3
Reading and Writing Files
179
4
Summary
183
1
Online References
183
1
Review Questions
184
1
Hands-On Exercises
184
3
Managing End-User Sessions
187
26
Multiple-Form Applications
188
14
Using Hidden Fields
188
2
Receiving and Using Hidden Fields
190
4
The checkname Subroutine
194
1
Building More Sophisticated Applications
195
7
Using Cookies to Save Information
202
11
Cookie Limitations
202
1
Why Some People Don't Like Cookies
203
1
Setting and Understanding Cookies
204
3
Reading Cookies
207
2
Some Advanced Cookie Options
209
1
Summary
210
1
Online References
210
1
Review Questions
210
1
Hands-On Exercises
211
2
Appendix A Some Basic UNIX Commands
213
4
Some Basic UNIX Commands
213
4
The more command
213
1
The Is Command Revised
213
2
The cp Command
215
2
Appendix B Answers to Odd-Numbered Review Questions
217
4
Index
221
9
Quick Reference
230
1
Perl Functions and Related Statements
230
1
Perl Functions Used in This Book
230
1
Some Special CGI.pm Functions
230