Chapter 39. Environment Variables
Perl uses the following environment variables. This does not include the environment variables used by library packages.
HOMEUsed if chdir has no argument.
LC_ALL, LC_CTYPE, LC_COLLATE, LC_NUMERIC, PERL_BADLANG, LANGUAGE, LANGControls how Perl handles data specific to particular natural languages.
LOGDIRUsed if chdir has no argument and
HOMEis not set.PATHUsed in executing subprocesses, and in finding the Perl script if
-Sis used.PERL5LIBA colon-separated list of directories to search for Perl library files before looking in the standard library and the current directory.
PERL5DBThe command to get the debugger code.
PERL_ENCODINGUsed by
use encodingwithout an explicit encoding name.PERLIOA space- or colon-separated list of I/O layers. This list becomes the default for all I/O operations.
PERLLIBUsed instead of
PERL5LIBifPERL5LIBis not defined.PERL5OPTInitial (command-line) options for Perl.
PERL5SHELLThe shell that Perl must use internally for executing system commands. Microsoft ports only.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access