|Perl Language Reference Manual|
by Larry Wall and others
Paperback (6"x9"), 724 pages
RRP £29.95 ($39.95)
Sales of this book support The Perl Foundation! Get a printed copy>>>
perlaix Perl notes for AIX perlamiga Perl notes for AmigaOS perlapollo Perl notes for Apollo DomainOS perlbeos Perl notes for BeOS perlbs2000 Perl notes for POSIX-BC BS2000 perlce Perl notes for WinCE perlcygwin Perl notes for Cygwin perldgux Perl notes for DG/UX perldos Perl notes for DOS perlepoc Perl notes for EPOC perlfreebsd Perl notes for FreeBSD perlhaiku Perl notes for Haiku perlhpux Perl notes for HP-UX perlhurd Perl notes for Hurd perlirix Perl notes for Irix perllinux Perl notes for Linux perlmacos Perl notes for Mac OS (Classic) perlmacosx Perl notes for Mac OS X perlmpeix Perl notes for MPE/iX perlnetware Perl notes for NetWare perlopenbsd Perl notes for OpenBSD perlos2 Perl notes for OS/2 perlos390 Perl notes for OS/390 perlos400 Perl notes for OS/400 perlplan9 Perl notes for Plan 9 perlqnx Perl notes for QNX perlriscos Perl notes for RISC OS perlsolaris Perl notes for Solaris perlsymbian Perl notes for Symbian perltru64 Perl notes for Tru64 perluts Perl notes for UTS perlvmesa Perl notes for VM/ESA perlvms Perl notes for VMS perlvos Perl notes for Stratus VOS perlwin32 Perl notes for Windows
On a Unix-like system, these documentation files will usually also be available as manpages for use with the man program.
In general, if something strange has gone wrong with your program and you're not sure where you should look for help, try the -w switch first. It will often point out exactly where the trouble is.
Perl officially stands for Practical Extraction and Report Language, except when it doesn't.
Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).
Perl combines (in the author's opinion, anyway) some of the best features of C, sed, awk, and sh, so people familiar with those languages should have little difficulty with it. (Language historians will also note some vestiges of csh, Pascal, and even BASIC-PLUS.) Expression syntax corresponds closely to C expression syntax. Unlike most Unix utilities, Perl does not arbitrarily limit the size of your data--if you've got the memory, Perl can slurp in your whole file as a single string. Recursion is of unlimited depth. And the tables used by hashes (sometimes called "associative arrays") grow as necessary to prevent degraded performance. Perl can use sophisticated pattern matching techniques to scan large amounts of data quickly. Although optimized for scanning text, Perl can also deal with binary data, and can make dbm files look like hashes. Setuid Perl scripts are safer than C programs through a dataflow tracing mechanism that prevents many stupid security holes.
If you have a problem that would ordinarily use sed or awk or sh, but it exceeds their capabilities or must run a little faster, and you don't want to write the silly thing in C, then Perl may be for you. There are also translators to turn your sed and awk scripts into Perl scripts.
But wait, there's more...
Begun in 1993 (see perlhist), Perl version 5 is nearly a complete rewrite that provides the following additional benefits:
- modularity and reusability using innumerable modules Described in "Perl modules (packages and symbol tables)" (perlmod) in the Perl Library Reference Manual (Volume 2), "Writing new modules and finding existing ones" (perlmodlib) in the Perl Library Reference Manual (Volume 2), and "Installing CPAN Modules" (perlmodinstall) in the Perl Library Reference Manual (Volume 6).
- embeddable and extensible Described in "How to embed perl in your C program" (perlembed) in the Perl C API and Internals Manual, "Tutorial for writing XSUBs" (perlXStut) in the Perl C API and Internals Manual, "XS language reference manual" (perlxs) in the Perl C API and Internals Manual, "Perl calling conventions from C" (perlcall) in the Perl C API and Internals Manual, "Introduction to the Perl API" (perlguts) in the Perl C API and Internals Manual, and xsubpp.
- roll-your-own magic variables (including multiple simultaneous DBM implementations) Described in 18 and "Provide framework for multiple DBMs" (AnyDBM_File) in the Perl Library Reference Manual (Volume 3).
- subroutines can now be overridden, autoloaded, and prototyped Described in 8.
- arbitrarily nested data structures and anonymous functions Described in "Mark's very short tutorial about references" (perlreftut) in Perl Tutorials, 15, "Perl Data Structures Cookbook" (perldsc) in Perl Tutorials, and "Manipulating Arrays of Arrays in Perl" (perllol) in Perl Tutorials.
- object-oriented programming Described in 16, "Beginner's Object-Oriented Tutorial" (perlboot) in Perl Tutorials, "Tom's object-oriented tutorial for perl" (perltoot) in Perl Tutorials, "Tom's OO Tutorial for Class Data in Perl" (perltooc) in Perl Tutorials, and "Bag'o Object Tricks (the BOT)" (perlbot) in Perl Tutorials.
- support for light-weight processes (threads) Described in "Tutorial on threads in Perl" (perlthrtut) in Perl Tutorials and "Perl interpreter-based threads" (threads) in the Perl Library Reference Manual (Volume 1).
- support for Unicode, internationalization, and localization Described in "Perl Unicode introduction" (perluniintro) in the Perl Unicode and Locales Manual, "Perl locale handling (internationalization and localization)" (perllocale) in the Perl Unicode and Locales Manual and "Buzzword: Concision" (Locale::Maketext) in the Perl Unicode and Locales Manual.
- lexical scoping Described in 8.
- regular expression enhancements Described in 11, with additional examples in 7.
- enhanced debugger and interactive Perl environment, with integrated editor support Described in "Perl debugging tutorial" (perldebtut) in Perl Tutorials, 23 and "Guts of Perl debugging" (perldebguts) in the Perl C API and Internals Manual.
- POSIX 1003.1 compliant library Described in "Perl interface to IEEE Std 1003.1" (POSIX) in the Perl Library Reference Manual (Volume 3).
Okay, that's definitely enough hype.
|ISBN 9781906966027||Perl Language Reference Manual||See the print edition|