Obtaining Online InformationPerl 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.
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.
There are also various notes for different operating systems. The main platforms covered are listed in Table A-3.
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. |