Team LiB   Previous Section   Next Section

Obtaining Online Information

Perl is one the most heavily documented languages in the known Universe! This appendix only scratches the surface. Fortunately, there exists a wealth of online information that comes automatically with Perl. To get going, type the following command:

$ perldoc perl

This will provide you with a complete list of the many available Perl manpages. The most important of these, besides perldoc perl itself, are listed in Table A-1.

Table A-1. The main Perl manpage documents

Manpage

Description

perltoc

Table of contents for the manpages

perlsyn

Perl syntax

perldata

Data structures

perlop

Operators and precedence

perlrequick, perlretut, perlre

Regular expressions; see Appendix C

perlvar

Predefined variables

perlsub

Subroutines

perlfunc

Built-in functions

perlreftut, perlref

Perl references

perlmod, perlobj

Modules and objects

perlipc

Inter-process communication

perlrun

Perl execution and options

perldebug, perldiag

Debugging and diagnostics

perlsec

Perl security

perlstyle

The Perl style guide

perltrap

Traps for the unwary

There used to be only a single perlfaq page, listing all the Frequently Asked Questions for Perl, but although this page still exists, its original information has been greatly expanded into the nine FAQs detailed in Table A-2. Again, access these with the perldoc perlfaq syntax.

Table A-2. The Perl FAQ documents

Manpage

Description

perlfaq

An FAQ overview

perlfaq1

General questions about Perl

perlfaq2

Obtaining and learning about Perl

perlfaq3

Programming tools

perlfaq4

Data manipulation

perlfaq5

Files and formats

perlfaq6

Regular expressions; see Appendix C

perlfaq7

Perl language issues

perlfaq8

System interaction

perlfaq9

Networking

There are also various notes for different operating systems. The main platforms covered are listed in Table A-3.

Table A-3. Operating system documentation

Manpage

Description

perlaix

Notes for AIX

perlsolaris

Notes for Solaris

perlhpux

Notes for HP-UX

perlcygwin

Notes for Cygwin

perlvms

Notes for VMS

perldos

Notes for DOS

perlwin32

Notes for Windows

perlos2

Notes for OS/2

perlos390

Notes for OS/390

Virtually every CPAN module author also provides his or her own self-installing perldoc notes for the manpage library. As an example, let's look at the first few rows of the documentation provided for DBD::Oracle:

$ perldoc DBD::Oracle
  
NAME
    DBD::Oracle - Oracle database driver for the DBI module
  
SYNOPSIS
      use DBI;
  
      $dbh = DBI->connect("dbi:Oracle:$dbname", $user, $passwd);
...

Finally, if there's a particular built-in function you're interested in, you can run perldoc with the -f function switch, to interrogate it:

$ perldoc -f printf
  
printf FILEHANDLE FORMAT, LIST
printf FORMAT, LIST
   Equivalent to "print FILEHANDLE sprintf(FORMAT, LIST)", except
   that "$\" (the output record separator) is not appended. The
   first argument of the list will be interpreted as the "printf"
   format. If "use locale" is in effect, the character used for the
   decimal point in formatted real numbers is affected by the
   LC_NUMERIC locale. See the perllocale manpage.
  
   Don't fall into the trap of using a "printf" when a simple
   "print" would do. The "print" is more efficient and less error
   prone.

For more online information, try http://www.perl.com or http://www.cpan.org.

Of course, there are also many excellent printed books describing the Perl language for both beginners and advanced developers. See Chapter 1 for some suggestions.

    Team LiB   Previous Section   Next Section