|
|
|
Perl 5
U N L E A S H E D
by Kamran Husain and Robert F. Breedlove
C O N T E N T S
Chapter
22 Using HTML FORMs
with Perl CGI Scripts
This book is dedicated to my parents: Dr. Saleha Bilal Husain and Dr. Bilal Riaz Husain. -KH
To my family, my wife Madeline for giving me the time and encouragement, and my children Delenn, Duncan, and Diego for setting my life in perspective. -BB
|
Copyright © 1996 by Sams Publishing
FIRST EDITION
All rights reserved. No part of this book shall be reproduced,
stored in a retrieval system, or transmitted by any means, electronic,
mechanical, photocopying, recording, or otherwise, without written
permission from the publisher. No patent liability is assumed
with respect to the use of the information contained herein. Although
every precaution has been taken in the preparation of this book,
the publisher and author assume no responsibility for errors or
omissions. Neither is any liability assumed for damages resulting
from the use of the information contained herein. For information,
address Sams Publishing, 201 W. 103rd St., Indianapolis, IN 46290.
International Standard Book Number: 0-672-30891-6
HTML conversion by :
M/s. LeafWriters (India) Pvt. Ltd.
Website : http://leaf.stpn.soft.net
e-mail :
leafwriters@leaf.stpn.soft.net
All terms mentioned in this book that are known to be trademarks
or service marks have been appropriately capitalized. Sams Publishing
cannot attest to the accuracy of this information. Use of a term
in this book should not be regarded as affecting the validity
of any trademark or service mark.
| Publisher | Richard K. Swadley
|
| Publishing Team Leader
| Greg Wiegand |
| Managing Editor |
Cindy Morrow |
| Director of Marketing
| John Pierce |
| Assistant Marketing Managers
| Kristina Perry, Rachel Wolfe
|
| Acquisitions Editor
| Christopher Denny
| Development Editor
| Anthony Amico |
| Software Development Specialist
| Brad Myers |
Production Editors |
Kristi Hart, Katherine Ewing
|
| Copy Editor |
Bart Reed | Indexer
| Chris Barrick |
| Technical Reviewers
| Zachary Bir, John Fleming, Elliotte Harold, Scott Hutton, Matt Liggett, John Neinart
| Editorial Coordinator
| Bill Whitmer |
| Technical Edit Coordinator
| Lynette Quinn |
Editorial Assistants
| Carol Ackerman, Andi Richter, Rhonda Tinch-Mize
|
| Cover Designer |
Tim Amrhein | Book Designer
| Gary Adair |
| Copy Writer |
Peter Fuller | Production Team Supervisor
| Brad Chinn |
| Production | Debra Bolhuis, Mona Brown, Michael Dietsch, Jason Hand, Daniel Harris, Bill Hartman, Susan Knose, Clint Lahnen, Paula Lowell, Laura Robbins, Bobbi Satterfield, Susan Van Ness,
Suzanne Whitmer
|
Acknowledgements
First of all, I would like to thank Chris Denny at Sams for giving
me the opportunity to write a book on Perl 5. I would also to
thank Kristi Hart, Tony Amico, and Bart Reed for their patience,
help, advice, and forcing me to keep up with deadlines.
I'd like to thank Uzma, my wife, and Haya and Hana, my twin daughters,
for putting up with my weird schedules and odd hours.
Last, but definitely not the least, thanks to all the Perl programmers
on Perl mailing lists for all the critique and comments via e-mail.
Kamran Husain
1996
About the Authors
Kamran Husain is a software consultant specializing in
developing real-time applications, data acquisition, and turn-key
systems in all sorts of software environments including C++, Java,
Windows NT and 95, JavaScript, and Motif. He can be reached via
e-mail at khusain@ikra.com.
Robert F. Breedlove is a senior systems engineer with EDS.
He has over 20 years of experience in data processing including
extensive client/server, UNIX, intranet and Internet experience.
He can be reached at breedlov@netcom.com,
or at his homepage: http://www.channel1.com/users/rbreed01/.
Tell Us What You Think!
As a reader, you are the most important critic and commentator
of our books. We value your opinion and want to know what we're
doing right, what we could do better, what areas you'd like to
see us publish in, and any other words of wisdom you're willing
to pass our way. You can help us make strong books that meet your
needs and give you the computer guidance you require.
Do you have access to CompuServe or the World Wide Web? Then check
out our CompuServe forum by typing GO
SAMS at any prompt. If you prefer the World
Wide Web, check out our site at http://www.mcp.com.
| Note |
If you have a technical question about this book, call the technical support line at (800) 571-5840, ext. 3668.
|
As the team leader of the group that created this book, I welcome
your comments. You can fax, e-mail, or write me directly to let
me know what you did or didn't like about this book-as well as
what we can do to make our books stronger. Here's the information:
| FAX: | 317/581-4669
|
| E-mail: | programming_mgr@sams.mcp.com
|
| Mail: | Greg Wiegand
Comments Department
Sams Publishing
201 W. 103rd Street
Indianapolis, IN 46290
|
This book documents a very powerful language called Perl 5, which
is version 5 of Larry Wall's creation, Perl. Perl is fast becoming
the de facto language for UNIX system administrators, Webmasters
on the World Wide Web, and programmers who want a fast, powerful,
and easy-to-use program language. This book will provide you with
the basics of the language and introduce you to the tools available
for Perl.
While writing this book, I assumed that you, the reader, have
had some prior programming experience. If you do not have any
prior programming experience, I strongly suggest not skipping
the first three chapters. If you are already a programmer and
are familiar with Perl 4, this book should provide you with enough
knowledge to use the great new features.
How This Book Is Organized
This book is divided into six parts.
Part I: The Basics
The first part provides a brief introduction to Perl as a programming
language. It covers the use of references to variables, regular
expressions, and the fundamentals of programming in Perl by using
modules. It introduces the use of Perl for programming with an
object-oriented paradigm. It also covers the not-so-basic but
very important topic of tying variables in Perl programs.
Part II: Communications
The second part covers applying Perl to different platforms and
types of applications. It begins with a chapter on processing
patterns and strings in Perl. For a long time, I debated reversing
the order of Chapters 6 and 7 |