B.2. Standard Modules

The following is a list of all Perl pragmas and modules included with the current Perl distribution (Version 5.004). The classification of the modules is admittedly arbitrary.

Table B.1. General Programming: Miscellaneous
autouseDefers loading of a module until it's used
constantCreates compile-time constants
BenchmarkChecks and compares running times of code
ConfigAccesses Perl configuration information
EnvImports environment variables
EnglishUses English or awk names for punctuation variables
FindBinFinds path of currently executing program
Getopt::LongExtended processing of command-line options
Getopt::StdProcesses single-character switches with switch clustering
libManipulates @INC at compile-time
ShellRuns shell commands transparently within Perl
strictRestricts unsafe constructs
SymbolGenerates anonymous globs; qualifies variable names
subsPredeclares subroutine names
varsPredeclares global variable names
Table B.2. General Programming: Error Handling and Logging
CarpGenerates error messages
diagnosticsForces verbose warning diagnostics
sigtrapEnables stack backtrace on unexpected signals
Sys::SyslogPerl interface to UNIX syslog (3) calls
Table B.3. General Programming: File Access and Handling
CwdGets pathname of current working directory
DirHandleSupplies object methods for directory handles
FcntlLoads the C Fcntl.h defines
File::BasenameParses file specifications
File::CheckTreeRuns many tests on a collection of files
File::Copy ...

Get Learning Perl, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.