| 1 |
Introduction | |
| 2 |
Perl Building Blocks | |
| 3 |
About Servers, Perl, and CGI.pm | |
| 4 |
Running Perl CGI on a Unix Server | |
| 5 | Testing Scripts
Locally on Windows Installing the Xitami or Sambar Server Installing Personal Web Server Installing IIS on Windows 2000 Displaying File Extensions Testing Your Server (Part 1) Installing the Perl Interpreter Installing CGI.pm Installing Scripts on Windows Servers Testing Your Server (Part II) | |
| 6 |
Testing Scripts Locally on the Mac | |
| 7 | Getting Data from
Visitors Labeling Incoming Data Creating a Form Creating Text Boxes Creating Password Boxes Creating Larger Text Areas Creating Radio Buttons Creating Checkboxes Creating Menus Creating the Submit Button Resetting the Form Using an Image To Submit Data Creating a Link to a Script Using a Link to Input Data to a Script | |
| 8 | Environment Variables Your Visitors Browser and Platform Viewing Available Environment Variables Storing Data from Environment Variables | |
| 9 | Getting Data
into the Script Getting Single-Valued Form Data Getting Multiple-Valued Form Data Getting All the Form Elements Names Getting All the Names and Values | |
| 10 | Simple Operations with
Scalars Assigning a Value to a Scalar Variable Multiplying, Dividing, Adding, Subtracting Using More Than One Operator Raising a Number to an Exponential Power Using Mathematical Functions Getting the Remainder of a Division Connecting Strings Together Repeating a String Operating and Assigning in One Step Incrementing (or Decrementing) a Variable | |
| 11 | Conditionals and
Loops Comparing Numbers Comparing Strings Evaluating Conditions without Comparisons Testing Two or More Comparisons at a Time Creating a Basic Conditional Statement Adding Options for False Conditions Adding Multiple, Independent Conditions Using Unless Repeating a Block for Each Item in an Array Loading the Default Variable Repeating a Block While a Condition Is True Repeating a Block While a Condition Is False Executing the Block at Least Once Repeating a Block a Given Number of Times Nesting Conditional Statements Skipping a Loop Iteration Jumping out of a Loop Altogether | |
| 12 | Working with Arrays Assigning a List to an Array Variable Referring to a Particular Item in an Array Referring to Multiple Items from an Array Adding or Replacing an Item in an Array Adding to the End or Beginning of an Array Removing the Last Item from an Array Removing the First Item from an Array Replacing More Than One Item in an Array Finding the Length of an Array Modifying All the Members of an Array Sorting Arrays Reversing the Order of an Arrays Contents | |
| 13 | Subroutines Creating a Simple Subroutine Using a Simple Subroutine Creating a Subroutine That Takes Input Calling a Subroutine That Takes Input Using a Subroutines Return Value Setting the Return Value Manually Storing Subroutines in an External File Calling Subroutines from an External File | |
| 14 | Working with Hashes Assigning a List to a Hash Getting a Value by Using a Key Adding or Replacing a Key-Value Pair Getting Several Values Using Keys Getting All of a Hashs Keys Getting All of a Hashs Values Getting Each Key and Value in a Hash Getting the Pairs in a Specified Order Removing Key-Value Pairs Checking to See If a Key Exists | |
| 15 |
Analyzing Data | |
| 16 | Remembering What
Visitors Tell You About Hidden Fields Adding Hidden Fields to a Form Storing Collected Data in a Hidden Field About Cookies Looking at Your Browsers Cookies Sending a Cookie Setting a Cookies Expiration Date Limiting a Cookie to a Domain Limiting a Cookie to a Part of Your Server Limiting Cookies to Secure Connections Reading and Using a Cookie How (and Why) Visitors Refuse Cookies | |
| 17 | Formatting, Printing
and HTML Formatting Output with Perl Creating a Format Pattern for Integers Creating a Format Pattern for Non-Integers Creating a Pattern for Strings Changing the Case Changing Characters Finding the Length of a String Finding Where Something Is in a String Extracting One String from Another Cleaning up the End of a String Formatting Output with HTML Printing Several Lines at a Time Simplifying Paths to Images and Links Outputting Data in a Table | |
| 18 | Security Reading the Security FAQs The Problem with Visitor Input Protecting Calls to the System Limiting Access to Files Using CGI.pm to Limit Incoming Data Keeping Information to Yourself Avoiding Tainted Data Cleaning and Using Outside Data | |
| 19 | Files and Directories Opening a File Verifying File and Directory Operations Writing to an External File Getting Exclusive Access to a File Reading Data from an External File Closing a File Renaming a File Removing a File Checking a Files Status Opening a Directory Reading the Contents of a Directory Closing a Directory Changing the Working Directory Creating a Directory Changing Permissions from within a Script Removing a Directory Getting Ready to E-mail Output Sending Output via E-mail | |
| 20 | Uploading Files Creating a Form for Uploading Files Getting the Name of the Uploaded File Finding out a Files MIME Type Specifying Where the File Should Be Saved Reading in and Limiting Uploaded Files | |
| A | Debugging Checking the Easy Stuff Creating an Error Subroutine Using Perls Error Reporting Viewing the System Error Log Isolating the Problem Following a Variables Progress | |
| B | Using other Folks
Scripts Using Other Folks Scripts Getting Other Peoples Scripts Expanding Compressed Scripts Configuring Borrowed Scripts Customizing Borrowed Scripts | |
| C | Permissions
on Unix Figuring out the Permissions Code Default Permissions Whos the Owner? | |
| D | Unix Essentials Telnetting to Your Unix Server Executing Commands in Unix Dealing with Paths in Unix Changing the Working Directory Finding out Where You Are Listing Directory Contents Eliminating Files Creating and Eliminating Directories Decompressing Tar and Zipped Files Getting Help with Unix | |
| E | Perl and CGI Resources Text Editors Telnet Programs Other Folks Scripts Learning More | |
| I | Index | |
Copyright 1998 by Elizabeth Castro. All Rights Reserved.