|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
|
IntroductionThis book is designed to give you all that you need to become a Perl programmer, and thats saying a lot. Perl is no ordinary programming languageit inspires devotion, passion, exaltation, and eccentricity, not to mention exasperation and frustration. Its more than a programming languageits a cause, the stuff of programmer poets and fanatics. Perl may be complex and arcane at times, it may be even be confusing and inconsistent, but to a true devotee, theres no other way to go. Youll see what I mean as you read this book. In its 12 year reign, the Practical Extraction and Reporting Language (also called, often by the same people, the Pathologically Eclectic Rubbish Lister) has become the object of much affection. Remarkable numbers of people devote remarkable numbers of volunteer hours to using, improving, and disseminating it. I started working with Perl years before I thought of writing a book on it. Maybe the Perl way of doing things will turn you into a fanatic, too. Whats In This BookThis book gives you not only the full Perl syntax, but also a realistic snapshot of Perl and how its used today. For example, youll find Perl just about anywhere you look on the Internet, so theres a lot of real-world CGI coverage here. Another popular modern topic is the connection between Perl and Tcl/Tk, which lets you display windows, buttons, menus, and more using Perl, and thats another topic in this book. There are other real-world topics, like connecting Perl to databases, to Windows OLE automation servers, to other processes, and so on, and theyre here too. All in all, this book is designed to give you a good picture of whats going on in Perl today. There are also many additions to Perl 5 that youll see in this book, such as writing more readable Perl code, BEGIN and END blocks in packages, POSIX compliance, object-oriented programming, arbitrarily nested data structures, lexical scoping, enhanced use of modules, and other topics. Version 5 was a big change for Perl, and its the version this book was written on. This book is divided into separate, easily accessible topicsnearly 500 of themeach of which addresses a separate programming issue. Here are some of those topics:
There are one or two conventions that Ill use in this book that you should be aware of. When a particular line of code needs to be pointed out, Ill shade it this way: $text = Hello!\n; print $text; And to set the output of a script apart from the script itself, Ill set it in lightface italics: $text = Hello!\n; print $text; Hello What Youll NeedI use Perl version 5.005 in this book. Perl is free, all you have to do is to download it and install itsee the topic Getting And Installing Perl in Chapter 1. If youre on a multiuser system, your system may already have Perl installed; to check, try this command at the command-line prompt, which will give you the Perl version: perl -v
Youll also need some way of creating Perl scripts. Such scripts are just plain text files filled with Perl statements and declarations. To create a Perl script, you should have an editor program that can save files in plain text format. See the topic Writing Perl Scripts in Chapter 1 for more information. One thing you wont need is a deep knowledge of Perls original operating system, Unix. Although many Perl books seem to take it for granted that youre a Unix programmer, thats not the case here. Perl has moved beyond Unix, and its time Perl books recognize that fact. Other ResourcesThere are other Perl resources that can be of assistance with Perl. Perl comes with a lot of useful documentation. On systems like Windows, that documentation is stored in linked HTML pages. On multi-user systems, you can usually access that documentation through system commands (such as the Unix man command). There are also a number of Usenet groups for Perl programmers:
If youre interested in CGI programming, take a look at this group:
There are also many, many Web pages out there on Perl (a random Web search turns up a mere 1,527,903 pages mentioning Perl):
Theres also the Perl journal, a magazine sent out four times a year. For more information, take a look at orwant.www.media.mit.edu/the_perl_journal/. And thats all the introduction needednow its time to get into Perl, starting with Chapter 1.
Copyright © The Coriolis Group, Inc.
|
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|