Previous Page Next Page

1.6. Perl Documentation

1.6.1. Perl Man Pages

The standard Perl distribution comes with complete online documentation called man pages, which provide help for all the standard utilities. (The name derives from the UNIX man [manual] pages.) Perl has divided its man pages into categories. If you type the following at your command-line prompt:

man perl

you will get a list of all the sections by category. So, if you want help on how to use Perl's regular expresssions, you would type

man perlre

and if you want help on subroutines, you would type

man perlsub

The Perl categories are listed as follows, with the following sections available only in the online reference manual:

perlbotObject-oriented tricks and examples
perldebugDebugging
perldiagDiagnostic messages
perldscData structures: intro
perlformFormats
perlfuncBuilt-in functions
perlipcInterprocess communication
perllolData structures: lists of lists
perlmodModules
perlobjObjects
perlopOperators and precedence
perlpodPlain old documentation
perlreRegular expressions
perlrefReferences
perlsockExtension for socket support
perlstyleStyle guide
perlsubSubroutines
perltieObjects hidden behind simple variables
perltrapTraps for the unwary
perlvarPredefined variables


If you are trying to find out how a particular library module works, you can use the perldoc command to get the documentation. For example, if you want to know about the CGI.pm module, type at the command line

perldoc CGI

and the documentation for the CGI.pm module will be displayed. If you type

perldoc English

the documentation for the English.pm module will be displayed.

To get documentation on a specific Perl function, type perldoc -f and the name of the function. For example, to find out about the localtime function, you would execute the following command at your command-line prompt. (You may have to set your UNIX/DOS path to execute this program directly.)

perldoc -f localtime
localtime EXPR
localtime
        Converts a time as returned by the time function to a 9-element
        list with the time analyzed for the local time zone. Typically
        used as follows:
           #   0    1    2     3     4    5     6     7     8
            ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
<continues>

					  

1.6.2. HTML Documentation

ActivePerl provides execllent documentation (from ActiveState.com) when you download Perl from its site. As shown in Figure 1.6, there are links to everything you need to know about Perl.

Figure 1.6. HTML Perl documentation from ActiveState.


Previous Page Next Page