home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Additional Resources

Perl Manpages

The online documentation for Perl, called manpages due to their UNIX origin, has been divided into separate sections so you can easily find what you are looking for without wading through hundreds of pages of text. Since the top-level manpage is simply called perl , the UNIX command man perl should take you to it.[ 1 ] That page in turn directs you to more specific pages. For example, man perlre displays the manpage for Perl's regular expressions. The perldoc command may work when the man (1) command won't, especially on module documentation that your system administrator may not have felt comfortable installing with the ordinary manpages. On the other hand, your system administrator may have installed the Perl documentation in hypertext markup language (HTML) format, especially on systems other than UNIX. If all else fails, you can always retrieve the Perl documentation from CPAN; look for this information in Section 0.5, "How to Get Perl" ."

[1] If you still get a humongous page when you do that, you're probably picking up the ancient Release 4 manpage. You may need to change your MANPATH environment variable.

Here are the principal manpages included with the 5.004 distribution of Perl:

Manpage

Topic

perl

Overview of documentation

perldelta

Changes since previous version

perlfaq

Frequently asked questions

perldata

Data structures

perlsyn

Syntax

perlop

Operators and precedence

perlre

Regular expressions

perlrun

Execution and options

perlfunc

Built-in functions

perlvar

Predefined variables

perlsub

Subroutines

perlmod

Modules: how they work

perlmodlib

Lib modules: how to write and use

perlform

Formats

perllocale

Locale support

perlref

References

perldsc

Data structures intro

perllol

Data structures: lists of lists

perltoot

Tutorial of object-oriented programming

perlobj

Objects

perltie

Objects hidden behind simple variables

perlbot

Object tricks and examples

perlipc

Interprocess communication

perldebug

Debugging

perldiag

Diagnostic messages

perlsec

Security

perltrap

Traps for the unwary

perlstyle

Style guide

perlpod

Plain old documentation

perlbook

Book information

perlembed

Ways to embed Perl in your C or C++ application

perlapio

Internal IO abstraction interface

perlxs

XS application programming interface

perlxstut

XS tutorial

perlguts

Internal functions for those doing extensions

perlcall

Calling conventions from C

Usenet Newsgroups

The Perl newsgroups are a great, if sometimes cluttered, source of information about Perl. comp.lang.perl.announce is a moderated, low-traffic newsgroup for Perl-related announcements. These often deal with new version releases, bug fixes, new extensions and modules, and Frequently Asked Questions (FAQs).

The high-traffic comp.lang.perl.misc group discusses everything from technical issues to Perl philosophy to Perl games and Perl poetry. Like Perl itself, comp.lang.perl.misc is meant to be useful, and no question is too silly to ask.[ 2 ]

[2] Of course, some questions are too silly to answer, especially those already answered in the FAQ.

The comp.lang.perl.tk group discusses how to use the popular Tk toolkit from Perl. The comp.lang.perl.modules group is about the development and use of Perl modules, which are the best way to get reusable code. There may be other comp.lang.perl.whatever newsgroups by the time you read this; look around.

One other newsgroup you might want to check out, at least if you're doing CGI programming on the Web, is comp.infosystems.www.authoring.cgi . While it isn't strictly speaking a Perl group, most of the programs discussed there are written in Perl. It's the right place to go for web-related Perl issues.

The Perl Home Page

If you have access to the World Wide Web, visit the Perl home page at http://www.perl.com/perl/ . It tells what's new in the Perl world, and contains source code and ports, documentation, third-party modules, the Perl bugs database, mailing list information, and more. This site also provides the CPAN multiplexer, described later.

Frequently Asked Questions List

The Perl Frequently Asked Questions (FAQ) is a collection of questions and answers that often show up on comp.lang.perl.misc . In many respects it's a companion to the available books, explaining concepts that people may not have understood and maintaining up-to-date information about such things as the latest release level and the best place to get the Perl source.

The FAQ is periodically posted to comp.lang.perl.announce , and can also be found on the Web at http://www.perl.com/perl/faq .

Since the 5.004 release of Perl, the FAQ has been included with the standard distribution's documentation. Here are the main sections, each available as its own manpage:

perlfaq

Structural overview of the FAQ.

perlfaq1

Very general, high-level information about Perl.

perlfaq2

Where to find source and documentation to Perl, support and training, and related matters.

perlfaq3

Programmer tools and programming support.

perlfaq4

Manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues.

perlfaq5

I/O and the "f " issues: filehandles, flushing, formats, and footers.

perlfaq6

Pattern matching and regular expressions.

perlfaq7

General Perl language issues that don't clearly fit into any of the other sections.

perlfaq8

Interprocess communication (IPC), control over the user-interface: keyboard, screen, and pointing devices.

perlfaq9

Networking, the Internet, and a few on the Web.

Bug Reports

In the unlikely event that you should encounter a bug that's in Perl proper and not just in your own program, you should try to reduce it to a minimal test case and then report it with the perlbug program that comes with Perl.

The Perl Distribution

Perl is distributed under either of two licenses (your choice). The first is the standard GNU Copyleft, which means, briefly, that if you can execute Perl on your system, you should have access to the full source of Perl for no additional charge. Alternately, Perl may also be distributed under the Artistic License, which some people find less threatening than the Copyleft (especially lawyers).

Within the Perl distribution, you will find some example programs in the eg / directory. You may also find other tidbits. Poke around in there on some rainy afternoon. Study the Perl source (if you're a C hacker with a masochistic streak). Look at the test suite. See how Configure determines whether you have the mkdir (2) system call. Figure out how Perl does dynamic loading of C modules. Or whatever else suits your fancy.

Other Books

Programming Perl is the definitive reference book on Perl, whereas this book is more of a tutorial. If you want to learn more about Perl's regular expressions, we suggest Mastering Regular Expressions , by Jeffrey E.F. Friedl (also published by O'Reilly & Associates).

Also check out O'Reilly and Associates' CGI Programming on the World Wide Web by Shishir Gundavaram; Web Client Programming with Perl by Clinton Wong; and HTML: The Definitive Guide, Second Edition , by Chuck Musciano and Bill Kennedy.

The AWK Programming Language , by Aho, Kernighan, and Weinberger (published by Addison-Wesley), and sed & awk , by Dale Dougherty (published by O'Reilly & Associates), provide an essential background in such things as associative arrays, regular expressions, and the general world view that gave rise to Perl. They also contain many examples that can be translated into Perl by the awk -to- perl translator, a2p, or by the sed -to- perl translator, s2p . These translators won't produce idiomatic Perl, of course, but if you can't figure out how to imitate one of those examples in Perl, the translator output will give you a good place to start.

For webmasters, we recommend the second edition of How to Setup and Maintain a Web Site , by Lincoln Stein, M.D., Ph.D. (published by Addison-Wesley). Dr. Stein, renowned author of Perl's CGI.pm module (described in Chapter 19, CGI Programming ), delivers a professional and comprehensive treatment of all issues related to administering a web site on UNIX, Mac, and Windows platforms.

We also recommend Johan Vromans's convenient and thorough quick reference booklet, called Perl 5 Desktop Reference , published by O'Reilly & Associates.