![]() |
![]()
![]() ![]()
![]()
![]() |
![]() |
Perl 5 UNLEASHEDby Kamran Husain and Robert F. Breedlove CONTENTSIntroductionChapter 1 What is Perl?
Chapter 2 A Brief Introduction to Perl
Chapter 3 References
Chapter 4 Introduction to Perl Modules
Chapter 5 Object-Oriented Programming in Perl
Chapter 6 Binding Variables to Objects
Chapter 7 String and Patterns
Chapter 8 Documenting Perl ScriptsChapter 9 Portability Issues with Windows and Perl
Chapter 10 Win32 Modules on Windows NT
Chapter 11 Security Issues in Perl
Chapter 12 Using Sockets
Chapter 13 Messaging Facilities: The System V Ipc Functions
Chapter 14 Signals, Pipes, FIFOs, and Perl
Chapter 15 Direct Access to System Facilities
Chapter 16 Command-line Interface with Perl
Chapter 17 GUI Interfaces with Perl/Tk
Chapter 18 Databases for Perl
Chapter 19 Generating Reports
Chapter 20 Introduction to Web Pages and CGI
Chapter 21 Building VRML Models with Perl
Chapter 22 Using HTML FORMs with Perl CGI Scripts
Chapter 23 HTML with Perl Modules
Chapter 24 Building and Installing the Perl 5 Interpreter
Chapter 25 Perl Internal Files and Structures
Chapter 26 Writing C Extensions in Perl
Chapter 27 Writing Extensions in C
Chapter 28 Client/Server Using Java Applets and Perl
Chapter 29 Practical Scripts While Using Perl
Chapter 30 Using the Perl Debugger
Chapter 31 Generating Code
Credits
FIRST EDITIONAll 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 :
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.
AcknowledgementsFirst 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 AuthorsKamran 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.
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:
IntroductionThis 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 OrganizedThis 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 because the concepts are both fundamental, but the chapter on tying variables seemed to fit in the first part. Most of the portability issues in programming in Perl on a Windows platform are also discussed in this part. Part III: Presenting and Sharing Data
The third part gets into networking and system-level programming issues for Perl. The basic communications features in Perl include sockets, System V Ipc messaging facilities, signals, pipes, and FIFOs, and are covered in this part. The basics of handling the command-line interface as well as a graphical user interface using Tcl/Tk and Perl are also covered in this part. The last two chapters of this part introduce the use of database front-ends and the report-generating facilities of Perl. The information in this part serves as the basis for writing Perl applications that can provide reports on data stored in databases. Part IV: Working with the Web
Section four introduces the World Wide Web and the Common Gateway Interface (CGI). Thick books have been written on these topics, and this part attempts to present the most practical information required to get you started writing CGI scripts and your own Web pages. This part covers how to access databases from within Perl and how to write your own module to generate VRML objects. The information in this chapter can serve as a basis for writing your own CGI scripts using the modules available on the World Wide Web for Perl. Part V: Under the Hood
The chapters in this part are geared towards the advanced user or the system administrator who has to install Perl on various platforms. The topics in this part tend to be centered on UNIX systems, but that's just where most of the heavy Perl development seems to be. I cover the internal data types used in Perl, and then based on this knowledge I go on to show the techniques of writing extensions and embedding Perl in C programs. Conventions Used in This BookThe following typographic conventions are used in this book:
There's Always a Better WayNow for a personal disclaimer of sorts. Even though I attempt to cover all the major points of the latest release of Perl, version 5.002 at the time we go to print, I probably will never be able to list all the features of this wonderful language. If there is one thing that I've learned while working with Perl, it is that there are so many ways of doing any one task. Every time I write a Perl script, I think that I "could've done it this way and maybe it'll run faster." The number of combinations of things to do with Perl never really ends. So, if you find a better way of writing Perl scripts than the ones shown in this book, don't be surprised-it's bound to happen. Do drop me a line, though, because I will incorporate them into the next edition of this book. I look forward to receiving all your comments and, yes, even criticisms and the usual flames.
Sincerely,
Kamran Husain |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
With any suggestions or questions please feel free to contact us |