search for books and compare prices
Tables of Contents for Perl and Cgi for the World Wide Web
Chapter/Section Title
Page #
Page Count
Introduction
13
10
What Is a Program?
14
1
Why Perl?
15
1
What About CGI?
16
1
Security Issues
17
1
Perl and HTML
18
1
About This Book
19
1
What This Book Is Not
20
1
What's New
21
1
The Perl and CGI VQS Guide Web Site
22
1
Perl Building Blocks
23
18
Perl Data
24
4
Operators and Functions
28
2
Quotation Marks
30
1
Quoting without Quotes
31
1
Statements, Blocks, and Scope
32
2
Declaring Private Variables
34
1
The Shebang Line
35
1
Creating a Perl CGI Script
36
2
Creating Output for a Browser
38
1
Documenting Your Script
39
1
Checking the Script's Syntax
40
1
About Servers, Perl, and CGI.pm
41
8
What Is a Server?
42
2
The Importance of Directories
44
2
Ask Your Web Host!
46
1
Getting a Perl Interpreter
47
1
Getting CGI.pm
48
1
Running Perl CGI on a Unix Server
49
10
Which Perl Are They Running?
50
1
What About CGI.pm?
51
1
Installing Scripts on Unix Servers
52
1
Uploading Your Script
53
3
Changing Permissions
56
2
Testing Your Unix Server
58
1
Testing Scripts Locally on Windows
59
12
Installing the Xitami or Sambar Server
60
2
Installing Personal Web Server
62
2
Installing IIS on Windows 2000
64
1
Displaying File Extensions
65
1
Testing Your Server (Part I)
66
1
Installing the Perl Interpreter
67
1
Installing CGI.pm
68
1
Installing Scripts on Windows Servers
69
1
Testing Your Server (Part II)
70
1
Testing Scripts Locally on the Mac
71
12
Installing Personal Web Sharing
72
1
The Root Web Directory
73
1
Carefully Sharing the Root Web Directory
74
2
Starting the Web Sharing Server
76
1
Testing the Server (Part I)
77
1
Installing MacPerl
78
1
Installing CGI.pm
79
1
Installing Scripts on Mac Servers
80
1
Testing Your Server (Part II)
81
2
Getting Data from Visitors
83
16
Labeling Incoming Data
84
2
Creating a Form
86
1
Creating Text Boxes
87
1
Creating Password Boxes
88
1
Creating Larger Text Areas
89
1
Creating Radio Buttons
90
1
Creating Checkboxes
91
1
Creating Menus
92
1
Creating the Submit Button
93
1
Resetting the Form
94
1
Using an Image to Submit Data
95
1
Creating a Link to a Script
96
1
Using a Link to Input Data to a Script
97
2
Environment Variables
99
4
Your Visitor's Browser and Platform
100
1
Viewing Available Environment Variables
101
1
Storing Data from Environment Variables
102
1
Getting Data into the Script
103
6
Getting Single-Valued Form Data
104
1
Getting Multiple-Valued Form Data
105
1
Getting All the Form Element's Names
106
1
Getting All the Names and Values
107
2
Simple Operations with Scalars
109
12
Assigning a Value to a Scalar Variable
110
2
Multiplying, Dividing, Adding, Subtracting
112
1
Using More Than One Operator
113
1
Raising a Number to an Exponential Power
114
1
Using Mathematical Functions
115
1
Getting the Remainder of a Division
116
1
Connecting Strings Together
117
1
Repeating a String
118
1
Operating and Assigning in One Step
119
1
Incrementing (or Decrementing) a Variable
120
1
Conditionals and Loops
121
18
Comparing Numbers
122
1
Comparing Strings
123
1
Evaluating Conditions without Comparisons
124
1
Testing Two or More Comparisons at a Time
125
1
Creating a Basic Conditional Statement
126
1
Adding Options for False Conditions
127
1
Adding Multiple, Independent Conditions
128
1
Using Unless
129
1
Repeating a Block for Each Item in an Array
130
1
Loading the Default Variable
131
1
Repeating a Block While a Condition Is True
132
1
Repeating a Block While a Condition Is False
133
1
Executing the Block at Least Once
134
1
Repeating a Block a Given Number of Times
135
1
Nesting Conditional Statements
136
1
Skipping a Loop Iteration
137
1
Jumping out of a Loop Altogether
138
1
Working with Arrays
139
18
Assigning a List to an Array Variable
140
2
Referring to a Particular Item in an Array
142
2
Referring to Multiple Items From an Array
144
1
Adding or Replacing an Item in an Array
145
1
Adding to the End or Beginning of an Array
146
2
Removing the Last Item from an Array
148
1
Removing the First Item from an Array
149
1
Replacing More Than One Item in an Array
150
2
Finding the Length of an Array
152
1
Modifying All the Members of an Array
153
1
Sorting Arrays
154
1
Reversing the Order of an Array's Contents
155
2
Subroutines
157
10
Creating a Simple Subroutine
158
1
Using a Simple Subroutine
159
1
Creating a Subroutine That Takes Input
160
1
Calling a Subroutine That Takes Input
161
1
Using a Subroutine's Return Value
162
1
Setting the Return Value Manually
163
1
Storing Subroutines in an External File
164
1
Calling Subroutines from an External File
165
2
Working with Hashes
167
14
Assigning a List to a Hash
168
1
Getting a Value by Using a Key
169
1
Adding or Replacing a Key-Value Pair
170
1
Getting Several Values Using Keys
171
1
Getting All of a Hash's Keys
172
1
Getting All of a Hash's Values
173
1
Getting Each Key and Value in a Hash
174
2
Getting the Pairs in a Specified Order
176
2
Removing Key-Value Pairs
178
1
Checking to See If a Key Exists
179
2
Analyzing Data
181
24
Finding Something
182
1
Finding and Replacing
183
1
Seeing and Using What Was Found
184
1
Splitting a Value into Pieces
185
1
Constructing Search Patterns
186
1
Tips for Constructing Search Patterns
187
1
Matching a Single Character
188
1
Matching a String of Characters
189
1
Matching a Character from a Group
190
1
Matching a Character That's Not in the Group
191
1
Using Class Shorthands
192
1
Limiting the Location
193
2
Choosing How Many to Match
195
5
Curbing a Quantifier's Greediness
200
1
Matching One Element or Another
201
1
More on Using What You Already Matched
202
3
Remembering What Visitors Tell You
205
16
About Hidden Fields
206
1
Adding Hidden Fields to a Form
207
1
Storing Collected Data in a Hidden Field
208
2
About Cookies
210
1
Looking at Your Browser's Cookies
211
1
Sending a Cookie
212
2
Setting a Cookie's Expiration Date
214
1
Limiting a Cookie to a Domain
215
1
Limiting a Cookie to a Part of Your Server
216
1
Limiting Cookies to Secure Connections
217
1
Reading and Using a Cookie
218
2
How (and Why) Visitors Refuse Cookies
220
1
Formatting, Printing, and HTML
221
16
Formatting Output with Perl
222
1
Creating a Format Pattern for Integers
223
1
Creating a Format Pattern for Non-Integers
224
1
Creating a Pattern for Strings
225
1
Changing the Case
226
1
Changing Characters
227
1
Finding the Length of a String
228
1
Finding Where Something Is in a String
229
1
Extracting One String from Another
230
1
Cleaning up the End of a String
231
1
Formatting Output with HTML
232
2
Printing Several Lines at a Time
234
1
Simplifying Paths to Images and Links
235
1
Outputting Data in a Table
236
1
Security
237
10
Reading the Security FAQs
238
1
The Problem with Visitor Input
239
1
Protecting Calls to the System
240
1
Limiting Access to Files
241
1
Using CGI.pm to Limit Incoming Data
242
1
Keeping Information to Yourself
243
1
Avoiding Tainted Data
244
1
Cleaning and Using Outside Data
245
2
Files and Directories
247
22
Opening a File
248
2
Verifying File and Directory Operations
250
1
Writing to an External File
251
1
Getting Exclusive Access to a File
252
1
Reading Data from an External File
253
1
Closing a File
254
1
Renaming a File
255
1
Removing a File
256
1
Checking a File's Status
257
1
Opening a Directory
258
1
Reading the Contents of a Directory
259
1
Closing a Directory
260
1
Changing the Working Directory
261
1
Creating a Directory
262
1
Changing Permissions from within a Script
263
1
Removing a Directory
264
1
Getting Ready to E-mail Output
265
1
Sending Output via E-mail
266
3
Uploading Files
269
8
Creating a Form for Uploading Files
270
1
Getting the Name of the Uploaded File
271
1
Finding out a File's MIME Type
272
1
Specifying Where the File Should Be Saved
273
1
Reading in and Limiting Uploaded Files
274
3
Appendix A: Debugging
277
8
Checking the Easy Stuff
278
2
Creating an Error Subroutine
280
1
Using Perl's Error Reporting
281
1
Viewing the System Error Log
282
1
Isolating the Problem
283
1
Following a Variable's Progress
284
1
Appendix B: Using Other Folks' Scripts
285
6
Using Other Folks' Scripts
286
1
Getting Other People's Scripts
287
1
Expanding Compressed Scripts
288
1
Configuring Borrowed Scripts
289
1
Customizing Borrowed Scripts
290
1
Appendix C: Permissions on Unix
291
4
Figuring out the Permissions Code
292
1
Default Permissions
293
1
Who's the Owner?
294
1
Appendix D: Unix Essentials
295
14
Telnetting to Your Unix Server
296
2
Executing Commands in Unix
298
1
Dealing with Paths in Unix
299
3
Changing the Working Directory
302
1
Finding out Where You Are
303
1
Listing Directory Contents
304
1
Eliminating Files
305
1
Creating and Eliminating Directories
306
1
Decompressing Tar and Zipped Files
307
1
Getting Help with Unix
308
1
Appendix E: Perl and CGI Resources
309
6
Text Editors
310
1
Telnet Programs
311
1
Other Folks' Scripts
312
1
Learning More
313
2
Index
315