O'Reilly logo

Learning Perl, Second Edition by Randal L. Schwartz, Tom Christiansen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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
ModuleFunction
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
ModuleFunction
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
ModuleFunction
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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required