Special Variables in Alphabetical Order

We’ve alphabetized these entries according to the long variable name. If you don’t know the long name of a variable, you can find it in the previous section. (Variables without alphabetical names are sorted to the front.)

So that we don’t have to keep repeating ourselves, each variable description starts with one or more of these annotations.

Table 25-1. Annotations for special variables

XXXDeprecated, do not use in anything new.
NOTNot Officially There (internal use only).
RMVRemoved from Perl.
ALLTruly global, shared by all packages.
PKGPackage global; each package can have its own.
FHAFilehandle attribute; one per I/O object.
DYNDynamically scoped automatically (implies ALL).
LEXLexically scoped at compile time.
RORead only; raises an exception if you modify.

When more than one variable name or symbol is listed, only the short one is available by default. Using the English module makes the longer synonyms available to the current package, and only to the current package, even if the variable is marked [ALL].

Entries of the form method HANDLE EXPR show object-oriented interfaces to the per-filehandle variables provided by the IO::Handle module. As of v5.14, this module is loaded on demand. (You may also use the HANDLE–>method(EXPR) notation if you prefer.) These let you avoid having to call select to change the default output handle before examining or changing that variable. Each such method returns the old value of the attribute; a ...

Get Programming Perl, 4th Edition now with O’Reilly online learning.

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