PERLGLOSSARY(1) Perl Programmers Reference Guide PERLGLOSSARY(1)
NAME
perlglossary - Perl Glossary
VERSION
version 5.20250619
DESCRIPTION
A glossary of terms (technical and otherwise) used in the Perl documenta-
tion, derived from the Glossary of Programming Perl, Fourth Edition. Words
or phrases in bold are defined elsewhere in this glossary.
Other useful sources include the Unicode Glossary , the Free On-Line Dictionary of Computing , the
Jargon File , and Wikipedia
.
A
accessor methods
A method used to indirectly inspect or update an objectas state (its
instance variables).
actual arguments
The scalar values that you supply to a function or subroutine when you
call it. For instance, when you call power("puff"), the string "puff"
is the actual argument. See also argument and formal arguments.
address operator
Some languages work directly with the memory addresses of values, but
this can be like playing with fire. Perl provides a set of asbestos
gloves for handling all memory management. The closest to an address
operator in Perl is the backslash operator, but it gives you a hard
reference, which is much safer than a memory address.
algorithm
A well-defined sequence of steps, explained clearly enough that even a
computer could do them.
alias
A nickname for something, which behaves in all ways as though youad
used the original name instead of the nickname. Temporary aliases are
implicitly created in the loop variable for "foreach" loops, in the $_
variable for "map" or "grep" operators, in $a and $b during "sort"as
comparison function, and in each element of @_ for the actual arguments
of a subroutine call. Permanent aliases are explicitly created in pack-
ages by importing symbols or by assignment to typeglobs. Lexically
scoped aliases for package variables are explicitly created by the
"our" declaration.
alphabetic
The sort of characters we put into words. In Unicode, this is all let-
ters including all ideographs and certain diacritics, letter numbers
like Roman numerals, and various combining marks.
alternatives
A list of possible choices from which you may select only one, as in,
aWould you like door A, B, or C?a Alternatives in regular expressions
are separated with a single vertical bar: "|". Alternatives in normal
Perl expressions are separated with a double vertical bar: "||". Logi-
cal alternatives in Boolean expressions are separated with either "||"
or "or".
anonymous
Used to describe a referent that is not directly accessible through a
named variable. Such a referent must be indirectly accessible through
at least one hard reference. When the last hard reference goes away,
the anonymous referent is destroyed without pity.
application
A bigger, fancier sort of program with a fancier name so people donat
realize they are using a program.
architecture
The kind of computer youare working on, where one akind of computera
means all those computers sharing a compatible machine language. Since
Perl programs are (typically) simple text files, not executable images,
a Perl program is much less sensitive to the architecture itas running
on than programs in other languages, such as C, that are compiled into
machine code. See also platform and operating system.
argument
A piece of data supplied to a program, subroutine, function, or method
to tell it what itas supposed to do. Also called a aparametera.
ARGVThe name of the array containing the argument vector from the command
line. If you use the empty "<>" operator, "ARGV" is the name of both
the filehandle used to traverse the arguments and the scalar containing
the name of the current input file.
arithmetical operator
A symbol such as "+" or "/" that tells Perl to do the arithmetic you
were supposed to learn in grade school.
array
An ordered sequence of values, stored such that you can easily access
any of the values using an integer subscript that specifies the valueas
offset in the sequence.
array context
An archaic expression for what is more correctly referred to as list
context.
Artistic License
The open source license that Larry Wall created for Perl, maximizing
Perlas usefulness, availability, and modifiability. The current version
is 2. ().
ASCII
The American Standard Code for Information Interchange (a 7-bit charac-
ter set adequate only for poorly representing English text). Often used
loosely to describe the lowest 128 values of the various ISO-8859-X
character sets, a bunch of mutually incompatible 8-bit codes best de-
scribed as half ASCII. See also Unicode.
assertion
A component of a regular expression that must be true for the pattern
to match but does not necessarily match any characters itself. Often
used specifically to mean a zero-width assertion.
assignment
An operator whose assigned mission in life is to change the value of a
variable.
assignment operator
Either a regular assignment or a compound operator composed of an ordi-
nary assignment and some other operator, that changes the value of a
variable in place; that is, relative to its old value. For example, "$a
+= 2" adds 2 to $a.
associative array
See hash. Please. The term associative array is the old Perl 4 term for
a hash. Some languages call it a dictionary.
associativity
Determines whether you do the left operator first or the right operator
first when you have aA operator B operator Ca, and the two operators
are of the same precedence. Operators like "+" are left associative,
while operators like "**" are right associative. See Camel chapter 3,
aUnary and Binary Operatorsa for a list of operators and their associa-
tivity.
asynchronous
Said of events or activities whose relative temporal ordering is inde-
terminate because too many things are going on at once. Hence, an asyn-
chronous event is one you didnat know when to expect.
atomA regular expression component potentially matching a substring con-
taining one or more characters and treated as an indivisible syntactic
unit by any following quantifier. (Contrast with an assertion that
matches something of zero width and may not be quantified.)
atomic operation
When Democritus gave the word aatoma to the indivisible bits of matter,
he meant literally something that could not be cut: a1/4- (not) +
-III1/4II (cuttable). An atomic operation is an action that canat be
interrupted, not one forbidden in a nuclear-free zone.
attribute
A new feature that allows the declaration of variables and subroutines
with modifiers, as in "sub foo : locked method". Also another name for
an instance variable of an object.
autogeneration
A feature of operator overloading of objects, whereby the behavior of
certain operators can be reasonably deduced using more fundamental op-
erators. This assumes that the overloaded operators will often have the
same relationships as the regular operators. See Camel chapter 13,
aOverloadinga.
autoincrement
To add one to something automatically, hence the name of the "++" oper-
ator. To instead subtract one from something automatically is known as
an aautodecrementa.
autoload
To load on demand. (Also called alazya loading.) Specifically, to call
an "AUTOLOAD" subroutine on behalf of an undefined subroutine.
autosplit
To split a string automatically, as the aa switch does when running un-
der ap or an in order to emulate awk. (See also the "AutoSplit" module,
which has nothing to do with the "aa" switch but a lot to do with au-
toloading.)
autovivification
A Graeco-Roman word meaning ato bring oneself to lifea. In Perl, stor-
age locations (lvalues) spontaneously generate themselves as needed,
including the creation of any hard reference values to point to the
next level of storage. The assignment "$a[5][5][5][5][5] = "quintet""
potentially creates five scalar storage locations, plus four references
(in the first four scalar locations) pointing to four new anonymous ar-
rays (to hold the last four scalar locations). But the point of auto-
vivification is that you donat have to worry about it.
AV Short for aarray valuea, which refers to one of Perlas internal data
types that holds an array. The "AV" type is a subclass of SV.
awk Descriptive editing termashort for aawkwarda. Also coincidentally
refers to a venerable text-processing language from which Perl derived
some of its high-level ideas.
B
backreference
A substring captured by a subpattern within unadorned parentheses in a
regex. Backslashed decimal numbers ("\1", "\2", etc.) later in the same
pattern refer back to the corresponding subpattern in the current
match. Outside the pattern, the numbered variables ($1, $2, etc.) con-
tinue to refer to these same values, as long as the pattern was the
last successful match of the current dynamic scope.
backtracking
The practice of saying, aIf I had to do it all over, Iad do it differ-
ently,a and then actually going back and doing it all over differently.
Mathematically speaking, itas returning from an unsuccessful recursion
on a tree of possibilities. Perl backtracks when it attempts to match
patterns with a regular expression, and its earlier attempts donat pan
out. See the section aThe Little Engine That /Couldn(nat)a in Camel
chapter 5, aPattern Matchinga.
backward compatibility
Means you can still run your old program because we didnat break any of
the features or bugs it was relying on.
bareword
A word sufficiently ambiguous to be deemed illegal under "use strict
'subs'". In the absence of that stricture, a bareword is treated as if
quotes were around it.
base class
A generic object type; that is, a class from which other, more specific
classes are derived genetically by inheritance. Also called a asuper-
classa by people who respect their ancestors.
big-endian
From Swift: someone who eats eggs big end first. Also used of computers
that store the most significant byte of a word at a lower byte address
than the least significant byte. Often considered superior to lit-
tle-endian machines. See also little-endian.
binary
Having to do with numbers represented in base 2. That means thereas ba-
sically two numbers: 0 and 1. Also used to describe a file of anon-
texta, presumably because such a file makes full use of all the binary
bits in its bytes. With the advent of Unicode, this distinction, al-
ready suspect, loses even more of its meaning.
binary operator
An operator that takes two operands.
bindTo assign a specific network address to a socket.
bit An integer in the range from 0 to 1, inclusive. The smallest possible
unit of information storage. An eighth of a byte or of a dollar. (The
term aPieces of Eighta comes from being able to split the old Spanish
dollar into 8 bits, each of which still counted for money. Thatas why a
25- cent piece today is still atwo bitsa.)
bit shift
The movement of bits left or right in a computer word, which has the
effect of multiplying or dividing by a power of 2.
bit string
A sequence of bits that is actually being thought of as a sequence of
bits, for once.
bless
In corporate life, to grant official approval to a thing, as in, aThe
VP of Engineering has blessed our WebCruncher project.a Similarly, in
Perl, to grant official approval to a referent so that it can function
as an object, such as a WebCruncher object. See the "bless" function in
Camel chapter 27, aFunctionsa.
block
What a process does when it has to wait for something: aMy process
blocked waiting for the disk.a As an unrelated noun, it refers to a
large chunk of data, of a size that the operating system likes to deal
with (normally a power of 2 such as 512 or 8192). Typically refers to a
chunk of data thatas coming from or going to a disk file.
BLOCK
A syntactic construct consisting of a sequence of Perl statements that
is delimited by braces. The "if" and "while" statements are defined in
terms of "BLOCK"s, for instance. Sometimes we also say ablocka to mean
a lexical scope; that is, a sequence of statements that acts like a
"BLOCK", such as within an "eval" or a file, even though the statements
arenat delimited by braces.
block buffering
A method of making input and output efficient by passing one block at a
time. By default, Perl does block buffering to disk files. See buffer
and command buffering.
Boolean
A value that is either true or false.
Boolean context
A special kind of scalar context used in conditionals to decide whether
the scalar value returned by an expression is true or false. Does not
evaluate as either a string or a number. See context.
breakpoint
A spot in your program where youave told the debugger to stop execution
so you can poke around and see whether anything is wrong yet.
broadcast
To send a datagram to multiple destinations simultaneously.
BSD A psychoactive drug, popular in the a80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called aSystem Va, but infinitely more useful. (Or, at
least, more fun.) The full chemical name is aBerkeley Standard Distrib-
utiona.
bucket
A location in a hash table containing (potentially) multiple entries
whose keys ahasha to the same hash value according to its hash func-
tion. (As internal policy, you donat have to worry about it unless
youare into internals, or policy.)
buffer
A temporary holding location for data. Data that are Block buffering
means that the data is passed on to its destination whenever the buffer
is full. Line buffering means that itas passed on whenever a complete
line is received. Command buffering means that itas passed every time
you do a "print" command (or equivalent). If your output is unbuffered,
the system processes it one byte at a time without the use of a holding
area. This can be rather inefficient.
built-in
A function that is predefined in the language. Even when hidden by
overriding, you can always get at a built- in function by qualifying
its name with the "CORE::" pseudopackage.
bundle
A group of related modules on CPAN. (Also sometimes refers to a group
of command-line switches grouped into one switch cluster.)
byteA piece of data worth eight bits in most places.
bytecode
A pidgin-like lingo spoken among adroids when they donat wish to reveal
their orientation (see endian). Named after some similar languages spo-
ken (for similar reasons) between compilers and interpreters in the
late 20aE century. These languages are characterized by representing
everything as a nonarchitecture-dependent sequence of bytes.
C
C A language beloved by many for its inside-out type definitions, in-
scrutable precedence rules, and heavy overloading of the function-call
mechanism. (Well, actually, people first switched to C because they
found lowercase identifiers easier to read than upper.) Perl is written
in C, so itas not surprising that Perl borrowed a few ideas from it.
cache
A data repository. Instead of computing expensive answers several
times, compute it once and save the result.
callback
A handler that you register with some other part of your program in the
hope that the other part of your program will trigger your handler when
some event of interest transpires.
call by reference
An argument-passing mechanism in which the formal arguments refer di-
rectly to the actual arguments, and the subroutine can change the ac-
tual arguments by changing the formal arguments. That is, the formal
argument is an alias for the actual argument. See also call by value.
call by value
An argument-passing mechanism in which the formal arguments refer to a
copy of the actual arguments, and the subroutine cannot change the ac-
tual arguments by changing the formal arguments. See also call by ref-
erence.
canonical
Reduced to a standard form to facilitate comparison.
capture variables
The variablesasuch as $1 and $2, and "%+" and "%a "athat hold the text
remembered in a pattern match. See Camel chapter 5, aPattern Matchinga.
capturing
The use of parentheses around a subpattern in a regular expression to
store the matched substring as a backreference. (Captured strings are
also returned as a list in list context.) See Camel chapter 5, aPattern
Matchinga.
cargo cult
Copying and pasting code without understanding it, while supersti-
tiously believing in its value. This term originated from preindustrial
cultures dealing with the detritus of explorers and colonizers of tech-
nologically advanced cultures. See The Gods Must Be Crazy.
caseA property of certain characters. Originally, typesetter stored capital
letters in the upper of two cases and small letters in the lower one.
Unicode recognizes three cases: lowercase (character property
"\p{lower}"), titlecase ("\p{title}"), and uppercase ("\p{upper}"). A
fourth casemapping called foldcase is not itself a distinct case, but
it is used internally to implement casefolding. Not all letters have
case, and some nonletters have case.
casefolding
Comparing or matching a string case-insensitively. In Perl, it is im-
plemented with the "/i" pattern modifier, the "fc" function, and the
"\F" double-quote translation escape.
casemapping
The process of converting a string to one of the four Unicode casemaps;
in Perl, it is implemented with the "fc", "lc", "ucfirst", and "uc"
functions.
character
The smallest individual element of a string. Computers store characters
as integers, but Perl lets you operate on them as text. The integer
used to represent a particular character is called that characteras
codepoint.
character class
A square-bracketed list of characters used in a regular expression to
indicate that any character of the set may occur at a given point.
Loosely, any predefined set of characters so used.
character property
A predefined character class matchable by the "\p" or "\P" metasymbol.
Unicode defines hundreds of standard properties for every possible
codepoint, and Perl defines a few of its own, too.
circumfix operator
An operator that surrounds its operand, like the angle operator, or
parentheses, or a hug.
class
A user-defined type, implemented in Perl via a package that provides
(either directly or by inheritance) methods (that is, subroutines) to
handle instances of the class (its objects). See also inheritance.
class method
A method whose invocant is a package name, not an object reference. A
method associated with the class as a whole. Also see instance method.
client
In networking, a process that initiates contact with a server process
in order to exchange data and perhaps receive a service.
closure
An anonymous subroutine that, when a reference to it is generated at
runtime, keeps track of the identities of externally visible lexical
variables, even after those lexical variables have supposedly gone out
of scope. Theyare called aclosuresa because this sort of behavior gives
mathematicians a sense of closure.
cluster
A parenthesized subpattern used to group parts of a regular expression
into a single atom.
CODEThe word returned by the "ref" function when you apply it to a refer-
ence to a subroutine. See also CV.
code generator
A system that writes code for you in a low-level language, such as code
to implement the backend of a compiler. See program generator.
codepoint
The integer a computer uses to represent a given character. ASCII code-
points are in the range 0 to 127; Unicode codepoints are in the range 0
to 0x10_FFFF; and Perl codepoints are in the range 0 to 2AAa1 or 0 to
2aa'a1, depending on your native integer size. In Perl Culture, some-
times called ordinals.
code subpattern
A regular expression subpattern whose real purpose is to execute some
Perl codeafor example, the "(?{...})" and "(??{...})" subpatterns.
collating sequence
The order into which characters sort. This is used by string comparison
routines to decide, for example, where in this glossary to put acollat-
ing sequencea.
co-maintainer
A person with permissions to index a namespace in PAUSE. Anyone can up-
load any namespace, but only primary and co-maintainers get their con-
tributions indexed.
combining character
Any character with the General Category of Combining Mark ("\p{GC=M}"),
which may be spacing or nonspacing. Some are even invisible. A sequence
of combining characters following a grapheme base character together
make up a single user-visible character called a grapheme. Most but not
all diacritics are combining characters, and vice versa.
command
In shell programming, the syntactic combination of a program name and
its arguments. More loosely, anything you type to a shell (a command
interpreter) that starts it doing something. Even more loosely, a Perl
statement, which might start with a label and typically ends with a
semicolon.
command buffering
A mechanism in Perl that lets you store up the output of each Perl com-
mand and then flush it out as a single request to the operating system.
Itas enabled by setting the $| ($AUTOFLUSH) variable to a true value.
Itas used when you donat want data sitting around, not going where itas
supposed to, which may happen because the default on a file or pipe is
to use block buffering.
command-line arguments
The values you supply along with a program name when you tell a shell
to execute a command. These values are passed to a Perl program
through @ARGV.
command name
The name of the program currently executing, as typed on the command
line. In C, the command name is passed to the program as the first com-
mand-line argument. In Perl, it comes in separately as $0.
comment
A remark that doesnat affect the meaning of the program. In Perl, a
comment is introduced by a "#" character and continues to the end of
the line.
compilation unit
The file (or string, in the case of "eval") that is currently being
compiled.
compile
The process of turning source code into a machine-usable form. See com-
pile phase.
compile phase
Any time before Perl starts running your main program. See also run
phase. Compile phase is mostly spent in compile time, but may also be
spent in runtime when "BEGIN" blocks, "use" or "no" declarations, or
constant subexpressions are being evaluated. The startup and import
code of any "use" declaration is also run during compile phase.
compiler
Strictly speaking, a program that munches up another program and spits
out yet another file containing the program in a amore executablea
form, typically containing native machine instructions. The perl pro-
gram is not a compiler by this definition, but it does contain a kind
of compiler that takes a program and turns it into a more executable
form (syntax trees) within the perl process itself, which the inter-
preter then interprets. There are, however, extension modules to get
Perl to act more like a areala compiler. See Camel chapter 16, aCom-
pilinga.
compile time
The time when Perl is trying to make sense of your code, as opposed to
when it thinks it knows what your code means and is merely trying to do
what it thinks your code says to do, which is runtime.
composer
A aconstructora for a referent that isnat really an object, like an
anonymous array or a hash (or a sonata, for that matter). For example,
a pair of braces acts as a composer for a hash, and a pair of brackets
acts as a composer for an array. See the section aCreating Referencesa
in Camel chapter 8, aReferencesa.
concatenation
The process of gluing one catas nose to another catas tail. Also a sim-
ilar operation on two strings.
conditional
Something aiffya. See Boolean context.
connection
In telephony, the temporary electrical circuit between the calleras and
the calleeas phone. In networking, the same kind of temporary circuit
between a client and a server.
construct
As a noun, a piece of syntax made up of smaller pieces. As a transitive
verb, to create an object using a constructor.
constructor
Any class method, instance, or subroutine that composes, initializes,
blesses, and returns an object. Sometimes we use the term loosely to
mean a composer.
context
The surroundings or environment. The context given by the surrounding
code determines what kind of data a particular expression is expected
to return. The three primary contexts are list context, scalar, and
void context. Scalar context is sometimes subdivided into Boolean con-
text, numeric context, string context, and void context. Thereas also a
adonat carea context (which is dealt with in Camel chapter 2, aBits and
Piecesa, if you care).
continuation
The treatment of more than one physical line as a single logical line.
Makefile lines are continued by putting a backslash before the newline.
Mail headers, as defined by RFC 822, are continued by putting a space
or tab after the newline. In general, lines in Perl do not need any
form of continuation mark, because whitespace (including newlines) is
gleefully ignored. Usually.
core dump
The corpse of a process, in the form of a file left in the working di-
rectory of the process, usually as a result of certain kinds of fatal
errors.
CPANThe Comprehensive Perl Archive Network. (See the Camel Preface and
Camel chapter 19, aCPANa for details.)
C preprocessor
The typical C compileras first pass, which processes lines beginning
with "#" for conditional compilation and macro definition, and does
various manipulations of the program text based on the current defini-
tions. Also known as cpp(1).
cracker
Someone who breaks security on computer systems. A cracker may be a
true hacker or only a script kiddie.
currently selected output channel
The last filehandle that was designated with select(FILEHANDLE); "STD-
OUT", if no filehandle has been selected.
current package
The package in which the current statement is compiled. Scan backward
in the text of your program through the current lexical scope or any
enclosing lexical scopes until you find a package declaration. Thatas
your current package name.
current working directory
See working directory.
CV In academia, a curriculum vitA, a fancy kind of rA(C)sumA(C). In Perl,
an internal acode valuea typedef holding a subroutine. The "CV" type is
a subclass of SV.
D
dangling statement
A bare, single statement, without any braces, hanging off an "if" or
"while" conditional. C allows them. Perl doesnat.
datagram
A packet of data, such as a UDP message, that (from the viewpoint of
the programs involved) can be sent independently over the network. (In
fact, all packets are sent independently at the IP level, but stream
protocols such as TCP hide this from your program.)
data structure
How your various pieces of data relate to each other and what shape
they make when you put them all together, as in a rectangular table or
a triangular tree.
data type
A set of possible values, together with all the operations that know
how to deal with those values. For example, a numeric data type has a
certain set of numbers that you can work with, as well as various math-
ematical operations that you can do on the numbers, but would make lit-
tle sense on, say, a string such as "Kilroy". Strings have their own
operations, such as concatenation. Compound types made of a number of
smaller pieces generally have operations to compose and decompose them,
and perhaps to rearrange them. Objects that model things in the real
world often have operations that correspond to real activities. For in-
stance, if you model an elevator, your elevator object might have an
"open_door" method.
DBM Stands for aDatabase Managementa routines, a set of routines that emu-
late an associative array using disk files. The routines use a dynamic
hashing scheme to locate any entry with only two disk accesses. DBM
files allow a Perl program to keep a persistent hash across multiple
invocations. You can "tie" your hash variables to various DBM implemen-
tations.
declaration
An assertion that states something exists and perhaps describes what
itas like, without giving any commitment as to how or where youall use
it. A declaration is like the part of your recipe that says, atwo cups
flour, one large egg, four or five tadpolesaa See statement for its op-
posite. Note that some declarations also function as statements. Sub-
routine declarations also act as definitions if a body is supplied.
declarator
Something that tells your program what sort of variable youad like.
Perl doesnat require you to declare variables, but you can use "my",
"our", or "state" to denote that you want something other than the de-
fault.
decrement
To subtract a value from a variable, as in adecrement $xa (meaning to
remove 1 from its value) or adecrement $x by 3a.
default
A value chosen for you if you donat supply a value of your own.
defined
Having a meaning. Perl thinks that some of the things people try to do
are devoid of meaning; in particular, making use of variables that have
never been given a value and performing certain operations on data that
isnat there. For example, if you try to read data past the end of a
file, Perl will hand you back an undefined value. See also false and
the "defined" entry in Camel chapter 27, aFunctionsa.
delimiter
A character or string that sets bounds to an arbitrarily sized textual
object, not to be confused with a separator or terminator. aTo delimita
really just means ato surrounda or ato enclosea (like these parentheses
are doing).
dereference
A fancy computer science term meaning ato follow a reference to what it
points toa. The adea part of it refers to the fact that youare taking
away one level of indirection.
derived class
A class that defines some of its methods in terms of a more generic
class, called a base class. Note that classes arenat classified exclu-
sively into base classes or derived classes: a class can function as
both a derived class and a base class simultaneously, which is kind of
classy.
descriptor
See file descriptor.
destroy
To deallocate the memory of a referent (first triggering its "DESTROY"
method, if it has one).
destructor
A special method that is called when an object is thinking about de-
stroying itself. A Perl programas "DESTROY" method doesnat do the ac-
tual destruction; Perl just triggers the method in case the class wants
to do any associated cleanup.
device
A whiz-bang hardware gizmo (like a disk or tape drive or a modem or a
joystick or a mouse) attached to your computer, which the operating
system tries to make look like a file (or a bunch of files). Under
Unix, these fake files tend to live in the /dev directory.
directive
A pod directive. See Camel chapter 23, aPlain Old Documentationa.
directory
A special file that contains other files. Some operating systems call
these afoldersa, adrawersa, acataloguesa, or acatalogsa.
directory handle
A name that represents a particular instance of opening a directory to
read it, until you close it. See the "opendir" function.
discipline
Some people need this and some people avoid it. For Perl, itas an old
way to say I/O layer.
dispatch
To send something to its correct destination. Often used metaphorically
to indicate a transfer of programmatic control to a destination se-
lected algorithmically, often by lookup in a table of function refer-
ences or, in the case of object methods, by traversing the inheritance
tree looking for the most specific definition for the method.
distribution
A standard, bundled release of a system of software. The default usage
implies source code is included. If that is not the case, it will be
called a abinary-onlya distribution.
dual-lived
Some modules live both in the Standard Library and on CPAN. These mod-
ules might be developed on two tracks as people modify either version.
The trend currently is to untangle these situations.
dweomer
An enchantment, illusion, phantasm, or jugglery. Said when Perlas magi-
cal dwimmer effects donat do what you expect, but rather seem to be the
product of arcane dweomercraft, sorcery, or wonder working. [From Mid-
dle English.]
dwimmer
DWIM is an acronym for aDo What I Meana, the principle that something
should just do what you want it to do without an undue amount of fuss.
A bit of code that does adwimminga is a adwimmera. Dwimming can require
a great deal of behind-the-scenes magic, which (if it doesnat stay
properly behind the scenes) is called a dweomer instead.
dynamic scoping
Dynamic scoping works over a dynamic scope, making variables visible
throughout the rest of the block in which they are first used and in
any subroutines that are called by the rest of the block. Dynamically
scoped variables can have their values temporarily changed (and implic-
itly restored later) by a "local" operator. (Compare lexical scoping.)
Used more loosely to mean how a subroutine that is in the middle of
calling another subroutine acontainsa that subroutine at runtime.
E
eclectic
Derived from many sources. Some would say too many.
element
A basic building block. When youare talking about an array, itas one of
the items that make up the array.
embedding
When something is contained in something else, particularly when that
might be considered surprising: aIave embedded a complete Perl inter-
preter in my editor!a
empty subclass test
The notion that an empty derived class should behave exactly like its
base class.
encapsulation
The veil of abstraction separating the interface from the implementa-
tion (whether enforced or not), which mandates that all access to an
objectas state be through methods alone.
endian
See little-endian and big-endian.
en passant
When you change a value as it is being copied. [From French ain
passinga, as in the exotic pawn-capturing maneuver in chess.]
environment
The collective set of environment variables your process inherits from
its parent. Accessed via %ENV.
environment variable
A mechanism by which some high-level agent such as a user can pass its
preferences down to its future offspring (child processes, grandchild
processes, great-grandchild processes, and so on). Each environment
variable is a key/value pair, like one entry in a hash.
EOF End of File. Sometimes used metaphorically as the terminating string of
a here document.
errno
The error number returned by a syscall when it fails. Perl refers to
the error by the name $! (or $OS_ERROR if you use the English module).
error
See exception or fatal error.
escape sequence
See metasymbol.
exception
A fancy term for an error. See fatal error.
exception handling
The way a program responds to an error. The exception-handling mecha-
nism in Perl is the "eval" operator.
execTo throw away the current processas program and replace it with an-
other, without exiting the process or relinquishing any resources held
(apart from the old memory image).
executable file
A file that is specially marked to tell the operating system that itas
okay to run this file as a program. Usually shortened to aexecutablea.
execute
To run a program or subroutine. (Has nothing to do with the "kill"
built-in, unless youare trying to run a signal handler.)
execute bit
The special mark that tells the operating system it can run this pro-
gram. There are actually three execute bits under Unix, and which bit
gets used depends on whether you own the file singularly, collectively,
or not at all.
exit status
See status.
exploit
Used as a noun in this case, this refers to a known way to compromise a
program to get it to do something the author didnat intend. Your task
is to write unexploitable programs.
export
To make symbols from a module available for import by other modules.
expression
Anything you can legally say in a spot where a value is required. Typi-
cally composed of literals, variables, operators, functions, and sub-
routine calls, not necessarily in that order.
extension
A Perl module that also pulls in compiled C or C++ code. More gener-
ally, any experimental option that can be compiled into Perl, such as
multithreading.
F
false
In Perl, any value that would look like "" or "0" if evaluated in a
string context. Since undefined values evaluate to "", all undefined
values are false, but not all false values are undefined.
FAQ Frequently Asked Question (although not necessarily frequently an-
swered, especially if the answer appears in the Perl FAQ shipped stan-
dard with Perl).
fatal error
An uncaught exception, which causes termination of the process after
printing a message on your standard error stream. Errors that happen
inside an "eval" are not fatal. Instead, the "eval" terminates after
placing the exception message in the $@ ($EVAL_ERROR) variable. You
can try to provoke a fatal error with the "die" operator (known as
throwing or raising an exception), but this may be caught by a dynami-
cally enclosing "eval". If not caught, the "die" becomes a fatal error.
feeping creaturism
A spoonerism of acreeping featurisma, noting the biological urge to add
just one more feature to a program.
field
A single piece of numeric or string data that is part of a longer
string, record, or line. Variable-width fields are usually split up by
separators (so use "split" to extract the fields), while fixed-width
fields are usually at fixed positions (so use "unpack"). Instance
variables are also known as afieldsa.
FIFOFirst In, First Out. See also LIFO. Also a nickname for a named pipe.
fileA named collection of data, usually stored on disk in a directory in a
filesystem. Roughly like a document, if youare into office metaphors.
In modern filesystems, you can actually give a file more than one name.
Some files have special properties, like directories and devices.
file descriptor
The little number the operating system uses to keep track of which
opened file youare talking about. Perl hides the file descriptor in-
side a standard I/O stream and then attaches the stream to a filehan-
dle.
fileglob
A awildcarda match on filenames. See the "glob" function.
filehandle
An identifier (not necessarily related to the real name of a file) that
represents a particular instance of opening a file, until you close it.
If youare going to open and close several different files in succes-
sion, itas fine to open each of them with the same filehandle, so you
donat have to write out separate code to process each file.
filename
One name for a file. This name is listed in a directory. You can use it
in an "open" to tell the operating system exactly which file you want
to open, and associate the file with a filehandle, which will carry the
subsequent identity of that file in your program, until you close it.
filesystem
A set of directories and files residing on a partition of the disk.
Sometimes known as a apartitiona. You can change the fileas name or
even move a file around from directory to directory within a filesystem
without actually moving the file itself, at least under Unix.
file test operator
A built-in unary operator that you use to determine whether something
is true about a file, such as ao $filename to test whether youare the
owner of the file.
filter
A program designed to take a stream of input and transform it into a
stream of output.
first-come
The first PAUSE author to upload a namespace automatically becomes the
primary maintainer for that namespace. The afirst comea permissions
distinguish a primary maintainer who was assigned that role from one
who received it automatically.
flagWe tend to avoid this term because it means so many things. It may
mean a command-line switch that takes no argument itself (such as Per-
las "an" and "ap" flags) or, less frequently, a single-bit indicator
(such as the "O_CREAT" and "O_EXCL" flags used in "sysopen"). Sometimes
informally used to refer to certain regex modifiers.
floating point
A method of storing numbers in ascientific notationa, such that the
precision of the number is independent of its magnitude (the decimal
point afloatsa). Perl does its numeric work with floating-point numbers
(sometimes called afloatsa) when it canat get away with using integers.
Floating-point numbers are mere approximations of real numbers.
flush
The act of emptying a buffer, often before itas full.
FMTEYEWTK
Far More Than Everything You Ever Wanted To Know. An exhaustive trea-
tise on one narrow topic, something of a super-FAQ. See Tom for far
more.
foldcase
The casemap used in Unicode when comparing or matching without regard
to case. Comparing lower-, title-, or uppercase are all unreliable due
to Unicodeas complex, one-to-many case mappings. Foldcase is a lower-
case variant (using a partially decomposed normalization form for cer-
tain codepoints) created specifically to resolve this.
forkTo create a child process identical to the parent process at its moment
of conception, at least until it gets ideas of its own. A thread with
protected memory.
formal arguments
The generic names by which a subroutine knows its arguments. In many
languages, formal arguments are always given individual names; in Perl,
the formal arguments are just the elements of an array. The formal ar-
guments to a Perl program are $ARGV[0], $ARGV[1], and so on. Similarly,
the formal arguments to a Perl subroutine are $_[0], $_[1], and so on.
You may give the arguments individual names by assigning the values to
a "my" list. See also actual arguments.
format
A specification of how many spaces and digits and things to put some-
where so that whatever youare printing comes out nice and pretty.
freely available
Means you donat have to pay money to get it, but the copyright on it
may still belong to someone else (like Larry).
freely redistributable
Means youare not in legal trouble if you give a bootleg copy of it to
your friends and we find out about it. In fact, wead rather you gave a
copy to all your friends.
freeware
Historically, any software that you give away, particularly if you make
the source code available as well. Now often called open source soft-
ware. Recently there has been a trend to use the term in contradistinc-
tion to open source software, to refer only to free software released
under the Free Software Foundationas GPL (General Public License), but
this is difficult to justify etymologically.
function
Mathematically, a mapping of each of a set of input values to a partic-
ular output value. In computers, refers to a subroutine or operator
that returns a value. It may or may not have input values (called argu-
ments).
funny character
Someone like Larry, or one of his peculiar friends. Also refers to the
strange prefixes that Perl requires as noun markers on its variables.
G
garbage collection
A misnamed featureait should be called, aexpecting your mother to pick
up after youa. Strictly speaking, Perl doesnat do this, but it relies
on a reference-counting mechanism to keep things tidy. However, we
rarely speak strictly and will often refer to the reference-counting
scheme as a form of garbage collection. (If itas any comfort, when your
interpreter exits, a areala garbage collector runs to make sure every-
thing is cleaned up if youave been messy with circular references and
such.)
GID Group IDain Unix, the numeric group ID that the operating system uses
to identify you and members of your group.
globStrictly, the shellas "*" character, which will match a agloba of char-
acters when youare trying to generate a list of filenames. Loosely,
the act of using globs and similar symbols to do pattern matching. See
also fileglob and typeglob.
global
Something you can see from anywhere, usually used of variables and sub-
routines that are visible everywhere in your program. In Perl, only
certain special variables are truly globalamost variables (and all sub-
routines) exist only in the current package. Global variables can be
declared with "our". See aGlobal Declarationsa in Camel chapter 4, aS-
tatements and Declarationsa.
global destruction
The garbage collection of globals (and the running of any associated
object destructors) that takes place when a Perl interpreter is being
shut down. Global destruction should not be confused with the Apoca-
lypse, except perhaps when it should.
glue language
A language such as Perl that is good at hooking things together that
werenat intended to be hooked together.
granularity
The size of the pieces youare dealing with, mentally speaking.
grapheme
A graphene is an allotrope of carbon arranged in a hexagonal crystal
lattice one atom thick. A grapheme, or more fully, a grapheme cluster
string is a single user-visible character, which may in turn be several
characters (codepoints) long. For example, a carriage return plus a
line feed is a single grapheme but two characters, while a aEa is a
single grapheme but one, two, or even three characters, depending on
normalization.
greedy
A subpattern whose quantifier wants to match as many things as possi-
ble.
grepOriginally from the old Unix editor command for aGlobally search for a
Regular Expression and Print ita, now used in the general sense of any
kind of search, especially text searches. Perl has a built-in "grep"
function that searches a list for elements matching any given crite-
rion, whereas the grep(1) program searches for lines matching a regular
expression in one or more files.
group
A set of users of which you are a member. In some operating systems
(like Unix), you can give certain file access permissions to other mem-
bers of your group.
GV An internal aglob valuea typedef, holding a typeglob. The "GV" type is
a subclass of SV.
H
hacker
Someone who is brilliantly persistent in solving technical problems,
whether these involve golfing, fighting orcs, or programming. Hacker
is a neutral term, morally speaking. Good hackers are not to be con-
fused with evil crackers or clueless script kiddies. If you confuse
them, we will presume that you are either evil or clueless.
handler
A subroutine or method that Perl calls when your program needs to re-
spond to some internal event, such as a signal, or an encounter with an
operator subject to operator overloading. See also callback.
hard reference
A scalar value containing the actual address of a referent, such that
the referentas reference count accounts for it. (Some hard references
are held internally, such as the implicit reference from one of a type-
globas variable slots to its corresponding referent.) A hard reference
is different from a symbolic reference.
hashAn unordered association of key/value pairs, stored such that you can
easily use a string key to look up its associated data value. This
glossary is like a hash, where the word to be defined is the key and
the definition is the value. A hash is also sometimes septisyllabically
called an aassociative arraya, which is a pretty good reason for simply
calling it a ahasha instead.
hash table
A data structure used internally by Perl for implementing associative
arrays (hashes) efficiently. See also bucket.
header file
A file containing certain required definitions that you must include
aaheada of the rest of your program to do certain obscure operations. A
C header file has a .h extension. Perl doesnat really have header
files, though historically Perl has sometimes used translated .h files
with a .ph extension. See "require" in Camel chapter 27, aFunctionsa.
(Header files have been superseded by the module mechanism.)
here document
So called because of a similar construct in shells that pretends that
the lines following the command are a separate file to be fed to the
command, up to some terminating string. In Perl, however, itas just a
fancy form of quoting.
hexadecimal
A number in base 16, ahexa for short. The digits for 10 through 15 are
customarily represented by the letters "a" through "f". Hexadecimal
constants in Perl start with "0x". See also the "hex" function in Camel
chapter 27, aFunctionsa.
home directory
The directory you are put into when you log in. On a Unix system, the
name is often placed into $ENV{HOME} or $ENV{LOGDIR} by login, but you
can also find it with "(get""pwuid($<))[7]". (Some platforms do not
have a concept of a home directory.)
hostThe computer on which a program or other data resides.
hubris
Excessive pride, the sort of thing for which Zeus zaps you. Also the
quality that makes you write (and maintain) programs that other people
wonat want to say bad things about. Hence, the third great virtue of a
programmer. See also laziness and impatience.
HV Short for a ahash valuea typedef, which holds Perlas internal represen-
tation of a hash. The "HV" type is a subclass of SV.
I
identifier
A legally formed name for most anything in which a computer program
might be interested. Many languages (including Perl) allow identifiers
to start with an alphabetic character, and then contain alphabetics and
digits. Perl also allows connector punctuation like the underscore
character wherever it allows alphabetics. (Perl also has more compli-
cated names, like qualified names.)
impatience
The anger you feel when the computer is being lazy. This makes you
write programs that donat just react to your needs, but actually antic-
ipate them. Or at least that pretend to. Hence, the second great virtue
of a programmer. See also laziness and hubris.
implementation
How a piece of code actually goes about doing its job. Users of the
code should not count on implementation details staying the same unless
they are part of the published interface.
import
To gain access to symbols that are exported from another module. See
"use" in Camel chapter 27, aFunctionsa.
increment
To increase the value of something by 1 (or by some other number, if so
specified).
indexing
In olden days, the act of looking up a key in an actual index (such as
a phone book). But now it's merely the act of using any kind of key or
position to find the corresponding value, even if no index is involved.
Things have degenerated to the point that Perlas "index" function
merely locates the position (index) of one string in another.
indirect filehandle
An expression that evaluates to something that can be used as a file-
handle: a string (filehandle name), a typeglob, a typeglob reference,
or a low-level IO object.
indirection
If something in a program isnat the value youare looking for but indi-
cates where the value is, thatas indirection. This can be done with ei-
ther symbolic references or hard.
indirect object
In English grammar, a short noun phrase between a verb and its direct
object indicating the beneficiary or recipient of the action. In Perl,
"print STDOUT "$foo\n";" can be understood as averb indirect-object ob-
jecta, where "STDOUT" is the recipient of the "print" action, and
"$foo" is the object being printed. Similarly, when invoking a method,
you might place the invocant in the dative slot between the method and
its arguments:
$gollum = new Pathetic::Creature "SmA(C)agol";
give $gollum "Fisssssh!";
give $gollum "Precious!";
indirect object slot
The syntactic position falling between a method call and its arguments
when using the indirect object invocation syntax. (The slot is distin-
guished by the absence of a comma between it and the next argument.)
"STDERR" is in the indirect object slot here:
print STDERR "Awake! Awake! Fear, Fire, Foes! Awake!\n";
infix
An operator that comes in between its operands, such as multiplication
in "24 * 7".
inheritance
What you get from your ancestors, genetically or otherwise. If you hap-
pen to be a class, your ancestors are called base classes and your de-
scendants are called derived classes. See single inheritance and multi-
ple inheritance.
instance
Short for aan instance of a classa, meaning an object of that class.
instance data
See instance variable.
instance method
A method of an object, as opposed to a class method.
A method whose invocant is an object, not a package name. Every object
of a class shares all the methods of that class, so an instance method
applies to all instances of the class, rather than applying to a par-
ticular instance. Also see class method.
instance variable
An attribute of an object; data stored with the particular object
rather than with the class as a whole.
integer
A number with no fractional (decimal) part. A counting number, like 1,
2, 3, and so on, but including 0 and the negatives.
interface
The services a piece of code promises to provide forever, in contrast
to its implementation, which it should feel free to change whenever it
likes.
interpolation
The insertion of a scalar or list value somewhere in the middle of an-
other value, such that it appears to have been there all along. In
Perl, variable interpolation happens in double-quoted strings and pat-
terns, and list interpolation occurs when constructing the list of val-
ues to pass to a list operator or other such construct that takes a
"LIST".
interpreter
Strictly speaking, a program that reads a second program and does what
the second program says directly without turning the program into a
different form first, which is what compilers do. Perl is not an inter-
preter by this definition, because it contains a kind of compiler that
takes a program and turns it into a more executable form (syntax trees)
within the perl process itself, which the Perl runtime system then in-
terprets.
invocant
The agent on whose behalf a method is invoked. In a class method, the
invocant is a package name. In an instance method, the invocant is an
object reference.
invocation
The act of calling up a deity, daemon, program, method, subroutine, or
function to get it to do what you think itas supposed to do. We usu-
ally acalla subroutines but ainvokea methods, since it sounds cooler.
I/O Input from, or output to, a file or device.
IO An internal I/O object. Can also mean indirect object.
I/O layer
One of the filters between the data and what you get as input or what
you end up with as output.
IPA India Pale Ale. Also the International Phonetic Alphabet, the standard
alphabet used for phonetic notation worldwide. Draws heavily on Uni-
code, including many combining characters.
IP Internet Protocol, or Intellectual Property.
IPC Interprocess Communication.
is-aA relationship between two objects in which one object is considered to
be a more specific version of the other, generic object: aA camel is a
mammal.a Since the generic object really only exists in a Platonic
sense, we usually add a little abstraction to the notion of objects and
think of the relationship as being between a generic base class and a
specific derived class. Oddly enough, Platonic classes donat always
have Platonic relationshipsasee inheritance.
iteration
Doing something repeatedly.
iterator
A special programming gizmo that keeps track of where you are in some-
thing that youare trying to iterate over. The "foreach" loop in Perl
contains an iterator; so does a hash, allowing you to "each" through
it.
IV The integer four, not to be confused with six, Tomas favorite editor.
IV also means an internal Integer Value of the type a scalar can hold,
not to be confused with an NV.
J
JAPHaJust Another Perl Hackera, a clever but cryptic bit of Perl code that,
when executed, evaluates to that string. Often used to illustrate a
particular Perl feature, and something of an ongoing Obfuscated Perl
Contest seen in USENET signatures.
K
key The string index to a hash, used to look up the value associated with
that key.
keyword
See reserved words.
L
label
A name you give to a statement so that you can talk about that state-
ment elsewhere in the program.
laziness
The quality that makes you go to great effort to reduce overall energy
expenditure. It makes you write labor-saving programs that other people
will find useful, and then document what you wrote so you donat have to
answer so many questions about it. Hence, the first great virtue of a
programmer. Also hence, this book. See also impatience and hubris.
leftmost longest
The preference of the regular expression engine to match the leftmost
occurrence of a pattern, then given a position at which a match will
occur, the preference for the longest match (presuming the use of a
greedy quantifier). See Camel chapter 5, aPattern Matchinga for much
more on this subject.
left shift
A bit shift that multiplies the number by some power of 2.
lexeme
Fancy term for a token.
lexer
Fancy term for a tokener.
lexical analysis
Fancy term for tokenizing.
lexical scoping
Looking at your Oxford English Dictionary through a microscope. (Also
known as static scoping, because dictionaries donat change very fast.)
Similarly, looking at variables stored in a private dictionary (name-
space) for each scope, which are visible only from their point of dec-
laration down to the end of the lexical scope in which they are de-
clared. aSyn. static scoping. aAnt. dynamic scoping.
lexical variable
A variable subject to lexical scoping, declared by "my". Often just
called a alexicala. (The "our" declaration declares a lexically scoped
name for a global variable, which is not itself a lexical variable.)
library
Generally, a collection of procedures. In ancient days, referred to a
collection of subroutines in a .pl file. In modern times, refers more
often to the entire collection of Perl modules on your system.
LIFOLast In, First Out. See also FIFO. A LIFO is usually called a stack.
lineIn Unix, a sequence of zero or more nonnewline characters terminated
with a newline character. On non-Unix machines, this is emulated by the
C library even if the underlying operating system has different ideas.
linebreak
A grapheme consisting of either a carriage return followed by a line
feed or any character with the Unicode Vertical Space character prop-
erty.
line buffering
Used by a standard I/O output stream that flushes its buffer after
every newline. Many standard I/O libraries automatically set up line
buffering on output that is going to the terminal.
line number
The number of lines read previous to this one, plus 1. Perl keeps a
separate line number for each source or input file it opens. The cur-
rent source fileas line number is represented by "__LINE__". The cur-
rent input line number (for the file that was most recently read via
"") is represented by the $. ($INPUT_LINE_NUMBER) variable. Many
error messages report both values, if available.
linkUsed as a noun, a name in a directory that represents a file. A given
file can have multiple links to it. Itas like having the same phone
number listed in the phone directory under different names. As a verb,
to resolve a partially compiled fileas unresolved symbols into a
(nearly) executable image. Linking can generally be static or dynamic,
which has nothing to do with static or dynamic scoping.
LISTA syntactic construct representing a comma- separated list of expres-
sions, evaluated to produce a list value. Each expression in a "LIST"
is evaluated in list context and interpolated into the list value.
listAn ordered set of scalar values.
list context
The situation in which an expression is expected by its surroundings
(the code calling it) to return a list of values rather than a single
value. Functions that want a "LIST" of arguments tell those arguments
that they should produce a list value. See also context.
list operator
An operator that does something with a list of values, such as "join"
or "grep". Usually used for named built-in operators (such as "print",
"unlink", and "system") that do not require parentheses around their
argument list.
list value
An unnamed list of temporary scalar values that may be passed around
within a program from any list-generating function to any function or
construct that provides a list context.
literal
A token in a programming language, such as a number or string, that
gives you an actual value instead of merely representing possible val-
ues as a variable does.
little-endian
From Swift: someone who eats eggs little end first. Also used of com-
puters that store the least significant byte of a word at a lower byte
address than the most significant byte. Often considered superior to
big-endian machines. See also big-endian.
local
Not meaning the same thing everywhere. A global variable in Perl can be
localized inside a dynamic scope via the "local" operator.
logical operator
Symbols representing the concepts aanda, aora, axora, and anota.
lookahead
An assertion that peeks at the string to the right of the current match
location.
lookbehind
An assertion that peeks at the string to the left of the current match
location.
loopA construct that performs something repeatedly, like a roller coaster.
loop control statement
Any statement within the body of a loop that can make a loop prema-
turely stop looping or skip an iteration. Generally, you shouldnat try
this on roller coasters.
loop label
A kind of key or name attached to a loop (or roller coaster) so that
loop control statements can talk about which loop they want to control.
lowercase
In Unicode, not just characters with the General Category of Lowercase
Letter, but any character with the Lowercase property, including Modi-
fier Letters, Letter Numbers, some Other Symbols, and one Combining
Mark.
lvaluable
Able to serve as an lvalue.
lvalue
Term used by language lawyers for a storage location you can assign a
new value to, such as a variable or an element of an array. The ala is
short for alefta, as in the left side of an assignment, a typical place
for lvalues. An lvaluable function or expression is one to which a
value may be assigned, as in "pos($x) = 10".
lvalue modifier
An adjectival pseudofunction that warps the meaning of an lvalue in
some declarative fashion. Currently there are three lvalue modifiers:
"my", "our", and "local".
M
magic
Technically speaking, any extra semantics attached to a variable such
as $!, $0, %ENV, or %SIG, or to any tied variable. Magical things hap-
pen when you diddle those variables.
magical increment
An increment operator that knows how to bump up ASCII alphabetics as
well as numbers.
magical variables
Special variables that have side effects when you access them or assign
to them. For example, in Perl, changing elements of the %ENV array also
changes the corresponding environment variables that subprocesses will
use. Reading the $! variable gives you the current system error number
or message.
Makefile
A file that controls the compilation of a program. Perl programs donat
usually need a Makefile because the Perl compiler has plenty of
self-control.
man The Unix program that displays online documentation (manual pages) for
you.
manpage
A apagea from the manuals, typically accessed via the man(1) command. A
manpage contains a SYNOPSIS, a DESCRIPTION, a list of BUGS, and so on,
and is typically longer than a page. There are manpages documenting
commands, syscalls, library functions, devices, protocols, files, and
such. In this book, we call any piece of standard Perl documentation
(like perlop or perldelta) a manpage, no matter what format itas in-
stalled in on your system.
matching
See pattern matching.
member data
See instance variable.
memory
This always means your main memory, not your disk. Clouding the issue
is the fact that your machine may implement virtual memory; that is, it
will pretend that it has more memory than it really does, and itall use
disk space to hold inactive bits. This can make it seem like you have a
little more memory than you really do, but itas not a substitute for
real memory. The best thing that can be said about virtual memory is
that it lets your performance degrade gradually rather than suddenly
when you run out of real memory. But your program can die when you run
out of virtual memory, tooaif you havenat thrashed your disk to death
first.
metacharacter
A character that is not supposed to be treated normally. Which charac-
ters are to be treated specially as metacharacters varies greatly from
context to context. Your shell will have certain metacharacters, dou-
ble-quoted Perl strings have other metacharacters, and regular expres-
sion patterns have all the double-quote metacharacters plus some extra
ones of their own.
metasymbol
Something wead call a metacharacter except that itas a sequence of more
than one character. Generally, the first character in the sequence
must be a true metacharacter to get the other characters in the meta-
symbol to misbehave along with it.
method
A kind of action that an object can take if you tell it to. See Camel
chapter 12, aObjectsa.
method resolution order
The path Perl takes through @INC. By default, this is a double depth
first search, once looking for defined methods and once for "AUTOLOAD".
However, Perl lets you configure this with "mro".
minicpan
A CPAN mirror that includes just the latest versions for each distribu-
tion, probably created with "CPAN::Mini". See Camel chapter 19, aCPANa.
minimalism
The belief that asmall is beautifula. Paradoxically, if you say some-
thing in a small language, it turns out big, and if you say it in a big
language, it turns out small. Go figure.
modeIn the context of the stat(2) syscall, refers to the field holding the
permission bits and the type of the file.
modifier
See statement modifier, regular expression, and lvalue, not necessarily
in that order.
module
A file that defines a package of (almost) the same name, which can ei-
ther export symbols or function as an object class. (A moduleas main
.pm file may also load in other files in support of the module.) See
the "use" built-in.
modulus
An integer divisor when youare interested in the remainder instead of
the quotient.
mojibake
When you speak one language and the computer thinks youare speaking an-
other. Youall see odd translations when you send UTFa8, for instance,
but the computer thinks you sent Latin-1, showing all sorts of weird
characters instead. The term is written aaeaaaain Japanese and means
acharacter rota, an apt description. Pronounced ["modEibake"] in stan-
dard IPA phonetics, or approximately amoh-jee-bah-keha.
monger
Short for one member of Perl mongers, a purveyor of Perl.
mortal
A temporary value scheduled to die when the current statement finishes.
mro See method resolution order.
multidimensional array
An array with multiple subscripts for finding a single element. Perl
implements these using referencesasee Camel chapter 9, aData Struc-
turesa.
multiple inheritance
The features you got from your mother and father, mixed together unpre-
dictably. (See also inheritance and single inheritance.) In computer
languages (including Perl), it is the notion that a given class may
have multiple direct ancestors or base classes.
N
named pipe
A pipe with a name embedded in the filesystem so that it can be ac-
cessed by two unrelated processes.
namespace
A domain of names. You neednat worry about whether the names in one
such domain have been used in another. See package.
NaN Not a number. The value Perl uses for certain invalid or inexpressible
floating-point operations.
network address
The most important attribute of a socket, like your telephoneas tele-
phone number. Typically an IP address. See also port.
newline
A single character that represents the end of a line, with the ASCII
value of 012 octal under Unix (but 015 on a Mac), and represented by
"\n" in Perl strings. For Windows machines writing text files, and for
certain physical devices like terminals, the single newline gets auto-
matically translated by your C library into a line feed and a carriage
return, but normally, no translation is done.
NFS Network File System, which allows you to mount a remote filesystem as
if it were local.
normalization
Converting a text string into an alternate but equivalent canonical (or
compatible) representation that can then be compared for equivalence.
Unicode recognizes four different normalization forms: NFD, NFC, NFKD,
and NFKC.
null character
A character with the numeric value of zero. Itas used by C to terminate
strings, but Perl allows strings to contain a null.
null list
A list value with zero elements, represented in Perl by "()".
null string
A string containing no characters, not to be confused with a string
containing a null character, which has a positive length and is true.
numeric context
The situation in which an expression is expected by its surroundings
(the code calling it) to return a number. See also context and string
context.
numification
(Sometimes spelled nummification and nummify.) Perl lingo for implicit
conversion into a number; the related verb is numify. Numification is
intended to rhyme with mummification, and numify with mummify. It is
unrelated to English numen, numina, numinous. We originally forgot the
extra m a long time ago, and some people got used to our funny
spelling, and so just as with "HTTP_REFERER"as own missing letter, our
weird spelling has stuck around.
NV Short for Nevada, no part of which will ever be confused with civiliza-
tion. NV also means an internal floating- point Numeric Value of the
type a scalar can hold, not to be confused with an IV.
nybble
Half a byte, equivalent to one hexadecimal digit, and worth four bits.
O
object
An instance of a class. Something that aknowsa what user-defined type
(class) it is, and what it can do because of what class it is. Your
program can request an object to do things, but the object gets to de-
cide whether it wants to do them or not. Some objects are more accommo-
dating than others.
octal
A number in base 8. Only the digits 0 through 7 are allowed. Octal con-
stants in Perl start with 0, as in 013. See also the "oct" function.
offset
How many things you have to skip over when moving from the beginning of
a string or array to a specific position within it. Thus, the minimum
offset is zero, not one, because you donat skip anything to get to the
first item.
one-liner
An entire computer program crammed into one line of text.
open source software
Programs for which the source code is freely available and freely re-
distributable, with no commercial strings attached. For a more de-
tailed definition, see .
operand
An expression that yields a value that an operator operates on. See
also precedence.
operating system
A special program that runs on the bare machine and hides the gory de-
tails of managing processes and devices. Usually used in a looser
sense to indicate a particular culture of programming. The loose sense
can be used at varying levels of specificity. At one extreme, you
might say that all versions of Unix and Unix-lookalikes are the same
operating system (upsetting many people, especially lawyers and other
advocates). At the other extreme, you could say this particular version
of this particular vendoras operating system is different from any
other version of this or any other vendoras operating system. Perl is
much more portable across operating systems than many other languages.
See also architecture and platform.
operator
A gizmo that transforms some number of input values to some number of
output values, often built into a language with a special syntax or
symbol. A given operator may have specific expectations about what
types of data you give as its arguments (operands) and what type of
data you want back from it.
operator overloading
A kind of overloading that you can do on built-in operators to make
them work on objects as if the objects were ordinary scalar values, but
with the actual semantics supplied by the object class. This is set up
with the overload pragmaasee Camel chapter 13, aOverloadinga.
options
See either switches or regular expression modifiers.
ordinal
An abstract characteras integer value. Same thing as codepoint.
overloading
Giving additional meanings to a symbol or construct. Actually, all
languages do overloading to one extent or another, since people are
good at figuring out things from context.
overriding
Hiding or invalidating some other definition of the same name. (Not to
be confused with overloading, which adds definitions that must be dis-
ambiguated some other way.) To confuse the issue further, we use the
word with two overloaded definitions: to describe how you can define
your own subroutine to hide a built-in function of the same name (see
the section aOverriding Built-in Functionsa in Camel chapter 11, aMod-
ulesa), and to describe how you can define a replacement method in a
derived class to hide a base classas method of the same name (see Camel
chapter 12, aObjectsa).
owner
The one user (apart from the superuser) who has absolute control over a
file. A file may also have a group of users who may exercise joint own-
ership if the real owner permits it. See permission bits.
P
package
A namespace for global variables, subroutines, and the like, such that
they can be kept separate from like-named symbols in other namespaces.
In a sense, only the package is global, since the symbols in the pack-
ageas symbol table are only accessible from code compiled outside the
package by naming the package. But in another sense, all package sym-
bols are also globalsatheyare just well-organized globals.
pad Short for scratchpad.
parameter
See argument.
parent class
See base class.
parse tree
See syntax tree.
parsing
The subtle but sometimes brutal art of attempting to turn your possibly
malformed program into a valid syntax tree.
patch
To fix by applying one, as it were. In the realm of hackerdom, a list-
ing of the differences between two versions of a program as might be
applied by the patch(1) program when you want to fix a bug or upgrade
your old version.
PATHThe list of directories the system searches to find a program you want
to execute. The list is stored as one of your environment variables,
accessible in Perl as $ENV{PATH}.
pathname
A fully qualified filename such as /usr/bin/perl. Sometimes confused
with "PATH".
pattern
A template used in pattern matching.
pattern matching
Taking a pattern, usually a regular expression, and trying the pattern
various ways on a string to see whether thereas any way to make it fit.
Often used to pick interesting tidbits out of a file.
PAUSE
The Perl Authors Upload SErver (), the gateway
for modules on their way to CPAN.
Perl mongers
A Perl user group, taking the form of its name from the New York Perl
mongers, the first Perl user group. Find one near you at
.
permission bits
Bits that the owner of a file sets or unsets to allow or disallow ac-
cess to other people. These flag bits are part of the mode word re-
turned by the "stat" built-in when you ask about a file. On Unix sys-
tems, you can check the ls(1) manpage for more information.
PernWhat you get when you do "Perl++" twice. Doing it only once will curl
your hair. You have to increment it eight times to shampoo your hair.
Lather, rinse, iterate.
phaser
The lifetime (execution timeline) of a program is broken up into
phases. A phaser is a block of code called during a specific execution
phase.
pipeA direct connection that carries the output of one process to the input
of another without an intermediate temporary file. Once the pipe is
set up, the two processes in question can read and write as if they
were talking to a normal file, with some caveats.
pipeline
A series of processes all in a row, linked by pipes, where each passes
its output stream to the next.
platform
The entire hardware and software context in which a program runs. A
program written in a platform-dependent language might break if you
change any of the following: machine, operating system, libraries, com-
piler, or system configuration. The perl interpreter has to be compiled
differently for each platform because it is implemented in C, but pro-
grams written in the Perl language are largely platform independent.
pod The markup used to embed documentation into your Perl code. Pod stands
for aPlain old documentationa. See Camel chapter 23, aPlain Old Docu-
mentationa.
pod command
A sequence, such as "=head1", that denotes the start of a pod section.
pointer
A variable in a language like C that contains the exact memory location
of some other item. Perl handles pointers internally so you donat have
to worry about them. Instead, you just use symbolic pointers in the
form of keys and variable names, or hard references, which arenat
pointers (but act like pointers and do in fact contain pointers).
polymorphism
The notion that you can tell an object to do something generic, and the
object will interpret the command in different ways depending on its
type. [< Greek IIII- + I1/4IIII(R), many forms.]
portThe part of the address of a TCP or UDP socket that directs packets to
the correct process after finding the right machine, something like the
phone extension you give when you reach the company operator. Also the
result of converting code to run on a different platform than origi-
nally intended, or the verb denoting this conversion.
portable
Once upon a time, C code compilable under both BSD and SysV. In gen-
eral, code that can be easily converted to run on another platform,
where aeasilya can be defined however you like, and usually is. Any-
thing may be considered portable if you try hard enough, such as a mo-
bile home or London Bridge.
porter
Someone who acarriesa software from one platform to another. Porting
programs written in platform-dependent languages such as C can be dif-
ficult work, but porting programs like Perl is very much worth the
agony.
possessive
Said of quantifiers and groups in patterns that refuse to give up any-
thing once theyave gotten their mitts on it. Catchier and easier to say
than the even more formal nonbacktrackable.
POSIX
The Portable Operating System Interface specification.
postfix
An operator that follows its operand, as in "$x++".
pp An internal shorthand for a apush- popa code; that is, C code imple-
menting Perlas stack machine.
pragma
A standard module whose practical hints and suggestions are received
(and possibly ignored) at compile time. Pragmas are named in all lower-
case.
precedence
The rules of conduct that, in the absence of other guidance, determine
what should happen first. For example, in the absence of parentheses,
you always do multiplication before addition.
prefix
An operator that precedes its operand, as in "++$x".
preprocessing
What some helper process did to transform the incoming data into a form
more suitable for the current process. Often done with an incoming
pipe. See also C preprocessor.
primary maintainer
The author that PAUSE allows to assign co-maintainer permissions to a
namespace. A primary maintainer can give up this distinction by assign-
ing it to another PAUSE author. See Camel chapter 19, aCPANa.
procedure
A subroutine.
process
An instance of a running program. Under multitasking systems like Unix,
two or more separate processes could be running the same program inde-
pendently at the same timeain fact, the "fork" function is designed to
bring about this happy state of affairs. Under other operating systems,
processes are sometimes called athreadsa, atasksa, or ajobsa, often
with slight nuances in meaning.
program
See script.
program generator
A system that algorithmically writes code for you in a high-level lan-
guage. See also code generator.
progressive matching
Pattern matching matching>that picks up where it left off before.
property
See either instance variable or character property.
protocol
In networking, an agreed-upon way of sending messages back and forth so
that neither correspondent will get too confused.
prototype
An optional part of a subroutine declaration telling the Perl compiler
how many and what flavor of arguments may be passed as actual argu-
ments, so you can write subroutine calls that parse much like built-in
functions. (Or donat parse, as the case may be.)
pseudofunction
A construct that sometimes looks like a function but really isnat. Usu-
ally reserved for lvalue modifiers like "my", for context modifiers
like "scalar", and for the pick-your-own-quotes constructs, "q//",
"qq//", "qx//", "qw//", "qr//", "m//", "s///", "y///", and "tr///".
pseudohash
Formerly, a reference to an array whose initial element happens to hold
a reference to a hash. You used to be able to treat a pseudohash refer-
ence as either an array reference or a hash reference. Pseudohashes are
no longer supported.
pseudoliteral
An operator X"that looks something like a literal, such as the out-
put-grabbing operator, "command""`".
public domain
Something not owned by anybody. Perl is copyrighted and is thus not in
the public domainaitas just freely available and freely redistrib-
utable.
pumpkin
A notional abatona handed around the Perl community indicating who is
the lead integrator in some arena of development.
pumpking
A pumpkin holder, the person in charge of pumping the pump, or at least
priming it. Must be willing to play the part of the Great Pumpkin now
and then.
PV A apointer valuea, which is Perl Internals Talk for a "char*".
Q
qualified
Possessing a complete name. The symbol $Ent::moot is qualified; $moot
is unqualified. A fully qualified filename is specified from the
top-level directory.
quantifier
A component of a regular expression specifying how many times the fore-
going atom may occur.
R
race condition
A race condition exists when the result of several interrelated events
depends on the ordering of those events, but that order cannot be guar-
anteed due to nondeterministic timing effects. If two or more programs,
or parts of the same program, try to go through the same series of
events, one might interrupt the work of the other. This is a good way
to find an exploit.
readable
With respect to files, one that has the proper permission bit set to
let you access the file. With respect to computer programs, one thatas
written well enough that someone has a chance of figuring out what itas
trying to do.
reaping
The last rites performed by a parent process on behalf of a deceased
child process so that it doesnat remain a zombie. See the "wait" and
"waitpid" function calls.
record
A set of related data values in a file or stream, often associated with
a unique key field. In Unix, often commensurate with a line, or a
blank-lineaterminated set of lines (a aparagrapha). Each line of the
/etc/passwd file is a record, keyed on login name, containing informa-
tion about that user.
recursion
The art of defining something (at least partly) in terms of itself,
which is a naughty no-no in dictionaries but often works out okay in
computer programs if youare careful not to recurse forever (which is
like an infinite loop with more spectacular failure modes).
reference
Where you look to find a pointer to information somewhere else. (See
indirection.) References come in two flavors: symbolic references and
hard references.
referent
Whatever a reference refers to, which may or may not have a name. Com-
mon types of referents include scalars, arrays, hashes, and subrou-
tines.
regex
See regular expression.
regular expression
A single entity with various interpretations, like an elephant. To a
computer scientist, itas a grammar for a little language in which some
strings are legal and others arenat. To normal people, itas a pattern
you can use to find what youare looking for when it varies from case to
case. Perlas regular expressions are far from regular in the theoreti-
cal sense, but in regular use they work quite well. Hereas a regular
expression: "/Oh s.*t./". This will match strings like a"Oh say can you
see by the dawn's early light"a and a"Oh sit!"a. See Camel chapter 5,
aPattern Matchinga.
regular expression modifier
An option on a pattern or substitution, such as "/i" to render the pat-
tern case- insensitive.
regular file
A file thatas not a directory, a device, a named pipe or socket, or a
symbolic link. Perl uses the "af" file test operator to identify regu-
lar files. Sometimes called a aplaina file.
relational operator
An operator that says whether a particular ordering relationship is
true about a pair of operands. Perl has both numeric and string rela-
tional operators. See collating sequence.
reserved words
A word with a specific, built-in meaning to a compiler, such as "if" or
"delete". In many languages (not Perl), itas illegal to use reserved
words to name anything else. (Which is why theyare reserved, after
all.) In Perl, you just canat use them to name labels or filehandles.
Also called akeywordsa.
return value
The value produced by a subroutine or expression when evaluated. In
Perl, a return value may be either a list or a scalar.
RFC Request For Comment, which despite the timid connotations is the name
of a series of important standards documents.
right shift
A bit shift that divides a number by some power of 2.
roleA name for a concrete set of behaviors. A role is a way to add behavior
to a class without inheritance.
rootThe superuser ("UID" == 0). Also the top-level directory of the
filesystem.
RTFMWhat you are told when someone thinks you should Read The Fine Manual.
run phase
Any time after Perl starts running your main program. See also compile
phase. Run phase is mostly spent in runtime but may also be spent in
compile time when "require", "do" "FILE", or "eval" "STRING" operators
are executed, or when a substitution uses the "/ee" modifier.
runtime
The time when Perl is actually doing what your code says to do, as op-
posed to the earlier period of time when it was trying to figure out
whether what you said made any sense whatsoever, which is compile time.
runtime pattern
A pattern that contains one or more variables to be interpolated before
parsing the pattern as a regular expression, and that therefore cannot
be analyzed at compile time, but must be reanalyzed each time the pat-
tern match operator is evaluated. Runtime patterns are useful but ex-
pensive.
RV A recreational vehicle, not to be confused with vehicular recreation.
RV also means an internal Reference Value of the type a scalar can
hold. See also IV and NV if youare not confused yet.
rvalue
A value that you might find on the right side of an assignment. See
also lvalue.
S
sandbox
A walled off area thatas not supposed to affect beyond its walls. You
let kids play in the sandbox instead of running in the road. See Camel
chapter 20, aSecuritya.
scalar
A simple, singular value; a number, string, or reference.
scalar context
The situation in which an expression is expected by its surroundings
(the code calling it) to return a single value rather than a list of
values. See also context and list context. A scalar context sometimes
imposes additional constraints on the return valueasee string context
and numeric context. Sometimes we talk about a Boolean context inside
conditionals, but this imposes no additional constraints, since any
scalar value, whether numeric or string, is already true or false.
scalar literal
A number or quoted stringaan actual value in the text of your program,
as opposed to a variable.
scalar value
A value that happens to be a scalar as opposed to a list.
scalar variable
A variable prefixed with "$" that holds a single value.
scope
From how far away you can see a variable, looking through one. Perl has
two visibility mechanisms. It does dynamic scoping of "local" vari-
ables, meaning that the rest of the block, and any subroutines that are
called by the rest of the block, can see the variables that are local
to the block. Perl does lexical scoping of "my" variables, meaning that
the rest of the block can see the variable, but other subroutines
called by the block cannot see the variable.
scratchpad
The area in which a particular invocation of a particular file or sub-
routine keeps some of its temporary values, including any lexically
scoped variables.
script
A text file that is a program intended to be executed directly rather
than compiled to another form of file before execution.
Also, in the context of Unicode, a writing system for a particular lan-
guage or group of languages, such as Greek, Bengali, or Tengwar.
script kiddie
A cracker who is not a hacker but knows just enough to run canned
scripts. A cargo-cult programmer.
sed A venerable Stream EDitor from which Perl derives some of its ideas.
semaphore
A fancy kind of interlock that prevents multiple threads or processes
from using up the same resources simultaneously.
separator
A character or string that keeps two surrounding strings from being
confused with each other. The "split" function works on separators. Not
to be confused with delimiters or terminators. The aora in the previous
sentence separated the two alternatives.
serialization
Putting a fancy data structure into linear order so that it can be
stored as a string in a disk file or database, or sent through a pipe.
Also called marshalling.
server
In networking, a process that either advertises a service or just hangs
around at a known location and waits for clients who need service to
get in touch with it.
service
Something you do for someone else to make them happy, like giving them
the time of day (or of their life). On some machines, well-known ser-
vices are listed by the "getservent" function.
setgid
Same as setuid, only having to do with giving away group privileges.
setuid
Said of a program that runs with the privileges of its owner rather
than (as is usually the case) the privileges of whoever is running it.
Also describes the bit in the mode word (permission bits) that controls
the feature. This bit must be explicitly set by the owner to enable
this feature, and the program must be carefully written not to give
away more privileges than it ought to.
shared memory
A piece of memory accessible by two different processes who otherwise
would not see each otheras memory.
shebang
Irish for the whole McGillicuddy. In Perl culture, a portmanteau of
asharpa and abanga, meaning the "#!" sequence that tells the system
where to find the interpreter.
shell
A command-line interpreter. The program that interactively gives you a
prompt, accepts one or more lines of input, and executes the programs
you mentioned, feeding each of them their proper arguments and input
data. Shells can also execute scripts containing such commands. Under
Unix, typical shells include the Bourne shell (/bin/sh), the C shell
(/bin/csh), and the Korn shell (/bin/ksh). Perl is not strictly a
shell because itas not interactive (although Perl programs can be in-
teractive).
side effects
Something extra that happens when you evaluate an expression. Nowadays
it can refer to almost anything. For example, evaluating a simple as-
signment statement typically has the aside effecta of assigning a value
to a variable. (And you thought assigning the value was your primary
intent in the first place!) Likewise, assigning a value to the special
variable $| ($AUTOFLUSH) has the side effect of forcing a flush after
every "write" or "print" on the currently selected filehandle.
sigil
A glyph used in magic. Or, for Perl, the symbol in front of a variable
name, such as "$", "@", and "%".
signal
A bolt out of the blue; that is, an event triggered by the operating
system, probably when youare least expecting it.
signal handler
A subroutine that, instead of being content to be called in the normal
fashion, sits around waiting for a bolt out of the blue before it will
deign to execute. Under Perl, bolts out of the blue are called signals,
and you send them with the "kill" built-in. See the %SIG hash in Camel
chapter 25, aSpecial Namesa and the section aSignalsa in Camel chapter
15, aInterprocess Communicationa.
single inheritance
The features you got from your mother, if she told you that you donat
have a father. (See also inheritance and multiple inheritance.) In com-
puter languages, the idea that classes reproduce asexually so that a
given class can only have one direct ancestor or base class. Perl sup-
plies no such restriction, though you may certainly program Perl that
way if you like.
slice
A selection of any number of elements from a list, array, or hash.
slurp
To read an entire file into a string in one operation.
socket
An endpoint for network communication among multiple processes that
works much like a telephone or a post office box. The most important
thing about a socket is its network address (like a phone number). Dif-
ferent kinds of sockets have different kinds of addressesasome look
like filenames, and some donat.
soft reference
See symbolic reference.
source filter
A special kind of module that does preprocessing on your script just
before it gets to the tokener.
stack
A device you can put things on the top of, and later take them back off
in the opposite order in which you put them on. See LIFO.
standard
Included in the official Perl distribution, as in a standard module, a
standard tool, or a standard Perl manpage.
standard error
The default output stream for nasty remarks that donat belong in stan-
dard output. Represented within a Perl program by the output> filehan-
dle "STDERR". You can use this stream explicitly, but the "die" and
"warn" built-ins write to your standard error stream automatically (un-
less trapped or otherwise intercepted).
standard input
The default input stream for your program, which if possible shouldnat
care where its data is coming from. Represented within a Perl program
by the filehandle "STDIN".
standard I/O
A standard C library for doing buffered input and output to the operat-
ing system. (The astandarda of standard I/O is at most marginally re-
lated to the astandarda of standard input and output.) In general,
Perl relies on whatever implementation of standard I/O a given operat-
ing system supplies, so the buffering characteristics of a Perl program
on one machine may not exactly match those on another machine. Nor-
mally this only influences efficiency, not semantics. If your standard
I/O package is doing block buffering and you want it to flush the
buffer more often, just set the $| variable to a true value.
Standard Library
Everything that comes with the official perl distribution. Some vendor
versions of perl change their distributions, leaving out some parts or
including extras. See also dual-lived.
standard output
The default output stream for your program, which if possible shouldnat
care where its data is going. Represented within a Perl program by the
filehandle "STDOUT".
statement
A command to the computer about what to do next, like a step in a
recipe: aAdd marmalade to batter and mix until mixed.a A statement is
distinguished from a declaration, which doesnat tell the computer to do
anything, but just to learn something.
statement modifier
A conditional or loop that you put after the statement instead of be-
fore, if you know what we mean.
static
Varying slowly compared to something else. (Unfortunately, everything
is relatively stable compared to something else, except for certain el-
ementary particles, and weare not so sure about them.) In computers,
where things are supposed to vary rapidly, astatica has a derogatory
connotation, indicating a slightly dysfunctional variable, subroutine,
or method. In Perl culture, the word is politely avoided.
If youare a C or C++ programmer, you might be looking for Perlas
"state" keyword.
static method
No such thing. See class method.
static scoping
No such thing. See lexical scoping.
static variable
No such thing. Just use a lexical variable in a scope larger than your
subroutine, or declare it with "state" instead of with "my".
stat structure
A special internal spot in which Perl keeps the information about the
last file on which you requested information.
status
The value returned to the parent process when one of its child
processes dies. This value is placed in the special variable $?. Its
upper eight bits are the exit status of the defunct process, and its
lower eight bits identify the signal (if any) that the process died
from. On Unix systems, this status value is the same as the status word
returned by wait(2). See "system" in Camel chapter 27, aFunctionsa.
STDERR
See standard error.
STDIN
See standard input.
STDIO
See standard I/O.
STDOUT
See standard output.
stream
A flow of data into or out of a process as a steady sequence of bytes
or characters, without the appearance of being broken up into packets.
This is a kind of interfaceathe underlying implementation may well
break your data up into separate packets for delivery, but this is hid-
den from you.
string
A sequence of characters such as aHe said !@#*&%@#*?!a. A string does
not have to be entirely printable.
string context
The situation in which an expression is expected by its surroundings
(the code calling it) to return a string. See also context and numeric
context.
stringification
The process of producing a string representation of an abstract object.
struct
C keyword introducing a structure definition or name.
structure
See data structure.
subclass
See derived class.
subpattern
A component of a regular expression pattern.
subroutine
A named or otherwise accessible piece of program that can be invoked
from elsewhere in the program in order to accomplish some subgoal of
the program. A subroutine is often parameterized to accomplish differ-
ent but related things depending on its input arguments. If the subrou-
tine returns a meaningful value, it is also called a function.
subscript
A value that indicates the position of a particular array element in an
array.
substitution
Changing parts of a string via the "s///" operator. (We avoid use of
this term to mean variable interpolation.)
substring
A portion of a string, starting at a certain character position (off-
set) and proceeding for a certain number of characters.
superclass
See base class.
superuser
The person whom the operating system will let do almost anything. Typi-
cally your system administrator or someone pretending to be your system
administrator. On Unix systems, the root user. On Windows systems, usu-
ally the Administrator user.
SV Short for ascalar valuea. But within the Perl interpreter, every refer-
ent is treated as a member of a class derived from SV, in an ob-
ject-oriented sort of way. Every value inside Perl is passed around as
a C language "SV*" pointer. The SV struct knows its own areferent ty-
pea, and the code is smart enough (we hope) not to try to call a hash
function on a subroutine.
switch
An option you give on a command line to influence the way your program
works, usually introduced with a minus sign. The word is also used as
a nickname for a switch statement.
switch cluster
The combination of multiple command- line switches (e.g., "aa ab ac")
into one switch (e.g., "aabc"). Any switch with an additional argument
must be the last switch in a cluster.
switch statement
A program technique that lets you evaluate an expression and then,
based on the value of the expression, do a multiway branch to the ap-
propriate piece of code for that value. Also called a acase structurea,
named after the similar Pascal construct. Most switch statements in
Perl are spelled "given". See aThe "given" statementa in Camel chapter
4, aStatements and Declarationsa.
The "given", "when" keywords and the smartmatch ("~~") operator will be
removed in Perl 5.42.
symbol
Generally, any token or metasymbol. Often used more specifically to
mean the sort of name you might find in a symbol table.
symbolic debugger
A program that lets you step through the execution of your program,
stopping or printing things out here and there to see whether anything
has gone wrong, and, if so, what. The asymbolica part just means that
you can talk to the debugger using the same symbols with which your
program is written.
symbolic link
An alternate filename that points to the real filename, which in turn
points to the real file. Whenever the operating system is trying to
parse a pathname containing a symbolic link, it merely substitutes the
new name and continues parsing.
symbolic reference
A variable whose value is the name of another variable or subroutine.
By dereferencing the first variable, you can get at the second one.
Symbolic references are illegal under "use strict "refs"".
symbol table
Where a compiler remembers symbols. A program like Perl must somehow
remember all the names of all the variables, filehandles, and subrou-
tines youave used. It does this by placing the names in a symbol table,
which is implemented in Perl using a hash table. There is a separate
symbol table for each package to give each package its own namespace.
synchronous
Programming in which the orderly sequence of events can be determined;
that is, when things happen one after the other, not at the same time.
syntactic sugar
An alternative way of writing something more easily; a shortcut.
syntax
From Greek III1/2II+/-I3/4II, awith-arrangementa. How things (particu-
larly symbols) are put together with each other.
syntax tree
An internal representation of your program wherein lower-level con-
structs dangle off the higher-level constructs enclosing them.
syscall
A function call directly to the operating system. Many of the important
subroutines and functions you use arenat direct system calls, but are
built up in one or more layers above the system call level. In general,
Perl programmers donat need to worry about the distinction. However, if
you do happen to know which Perl functions are really syscalls, you can
predict which of these will set the $! ($ERRNO) variable on failure.
Unfortunately, beginning programmers often confusingly employ the term
asystem calla to mean what happens when you call the Perl "system"
function, which actually involves many syscalls. To avoid any confu-
sion, we nearly always say asyscalla for something you could call indi-
rectly via Perlas "syscall" function, and never for something you would
call with Perlas "system" function.
T
taint checks
The special bookkeeping Perl does to track the flow of external data
through your program and disallow their use in system commands.
tainted
Said of data derived from the grubby hands of a user, and thus unsafe
for a secure program to rely on. Perl does taint checks if you run a
setuid (or setgid) program, or if you use the "aT" switch.
taint mode
Running under the "aT" switch, marking all external data as suspect and
refusing to use it with system commands. See Camel chapter 20, aSecu-
ritya.
TCP Short for Transmission Control Protocol. A protocol wrapped around the
Internet Protocol to make an unreliable packet transmission mechanism
appear to the application program to be a reliable stream of bytes.
(Usually.)
termShort for a aterminalaathat is, a leaf node of a syntax tree. A thing
that functions grammatically as an operand for the operators in an ex-
pression.
terminator
A character or string that marks the end of another string. The $/
variable contains the string that terminates a "readline" operation,
which "chomp" deletes from the end. Not to be confused with delimiters
or separators. The period at the end of this sentence is a terminator.
ternary
An operator taking three operands. Sometimes pronounced trinary.
textA string or file containing primarily printable characters.
thread
Like a forked process, but without forkas inherent memory protection. A
thread is lighter weight than a full process, in that a process could
have multiple threads running around in it, all fighting over the same
processas memory space unless steps are taken to protect threads from
one another.
tie The bond between a magical variable and its implementation class. See
the "tie" function in Camel chapter 27, aFunctionsa and Camel chapter
14, aTied Variablesa.
titlecase
The case used for capitals that are followed by lowercase characters
instead of by more capitals. Sometimes called sentence case or head-
line case. English doesnat use Unicode titlecase, but casing rules for
English titles are more complicated than simply capitalizing each wor-
das first character.
TMTOWTDI
Thereas More Than One Way To Do It, the Perl Motto. The notion that
there can be more than one valid path to solving a programming problem
in context. (This doesnat mean that more ways are always better or that
all possible paths are equally desirableajust that there need not be
One True Way.)
token
A morpheme in a programming language, the smallest unit of text with
semantic significance.
tokener
A module that breaks a program text into a sequence of tokens for later
analysis by a parser.
tokenizing
Splitting up a program text into tokens. Also known as alexinga, in
which case you get alexemesa instead of tokens.
toolbox approach
The notion that, with a complete set of simple tools that work well to-
gether, you can build almost anything you want. Which is fine if youare
assembling a tricycle, but if youare building a defranishizing com-
boflux regurgalator, you really want your own machine shop in which to
build special tools. Perl is sort of a machine shop.
topic
The thing youare working on. Structures like while(<>), "for", "fore-
ach", and "given" set the topic for you by assigning to $_, the default
(topic) variable.
transliterate
To turn one string representation into another by mapping each charac-
ter of the source string to its corresponding character in the result
string. Not to be confused with translation: for example, Greek IIIII-
III1/4II transliterates into polychromos but translates into many-col-
ored. See the "tr///" operator in Camel chapter 5, aPattern Matchinga.
trigger
An event that causes a handler to be run.
trinary
Not a stellar system with three stars, but an operator taking three
operands. Sometimes pronounced ternary.
troff
A venerable typesetting language from which Perl derives the name of
its $% variable and which is secretly used in the production of Camel
books.
trueAny scalar value that doesnat evaluate to 0 or "".
truncating
Emptying a file of existing contents, either automatically when opening
a file for writing or explicitly via the "truncate" function.
typeSee data type and class.
type casting
Converting data from one type to another. C permits this. Perl does
not need it. Nor want it.
typedef
A type definition in the C and C++ languages.
typed lexical
A lexical variable lexical>that is declared with a class type: "my
Pony $bill".
typeglob
Use of a single identifier, prefixed with "*". For example, *name
stands for any or all of $name, @name, %name, &name, or just "name".
How you use it determines whether it is interpreted as all or only one
of them. See aTypeglobs and Filehandlesa in Camel chapter 2, aBits and
Piecesa.
typemap
A description of how C types may be transformed to and from Perl types
within an extension module written in XS.
U
UDP User Datagram Protocol, the typical way to send datagrams over the In-
ternet.
UID A user ID. Often used in the context of file or process ownership.
umask
A mask of those permission bits that should be forced off when creating
files or directories, in order to establish a policy of whom youall or-
dinarily deny access to. See the "umask" function.
unary operator
An operator with only one operand, like "!" or "chdir". Unary operators
are usually prefix operators; that is, they precede their operand. The
"++" and "aa" operators can be either prefix or postfix. (Their posi-
tion does change their meanings.)
Unicode
A character set comprising all the major character sets of the world,
more or less. See .
UnixA very large and constantly evolving language with several alternative
and largely incompatible syntaxes, in which anyone can define anything
any way they choose, and usually do. Speakers of this language think
itas easy to learn because itas so easily twisted to oneas own ends,
but dialectical differences make tribal intercommunication nearly im-
possible, and travelers are often reduced to a pidgin-like subset of
the language. To be universally understood, a Unix shell programmer
must spend years of study in the art. Many have abandoned this disci-
pline and now communicate via an Esperanto-like language called Perl.
In ancient times, Unix was also used to refer to some code that a cou-
ple of people at Bell Labs wrote to make use of a PDP-7 computer that
wasnat doing much of anything else at the time.
uppercase
In Unicode, not just characters with the General Category of Uppercase
Letter, but any character with the Uppercase property, including some
Letter Numbers and Symbols. Not to be confused with titlecase.
UTF-8 string
A "string" whose ordinals represent a valid sequence of UTF-8 bytes.
Sometimes called a "UTF-8 encoded string".
(IMPORTANT: This is unrelated to Perlas internal aUTF8 flaga, which
only Perl itself should usually care about. UTF-8 strings may have that
flag set or unset.)
V
value
An actual piece of data, in contrast to all the variables, references,
keys, indices, operators, and whatnot that you need to access the
value.
variable
A named storage location that can hold any of various kinds of value,
as your program sees fit.
variable interpolation
The interpolation of a scalar or array variable into a string.
variadic
Said of a function that happily receives an indeterminate number of ac-
tual arguments.
vector
Mathematical jargon for a list of scalar values.
virtual
Providing the appearance of something without the reality, as in: vir-
tual memory is not real memory. (See also memory.) The opposite of
avirtuala is atransparenta, which means providing the reality of some-
thing without the appearance, as in: Perl handles the variable-length
UTFa8 character encoding transparently.
void context
A form of scalar context in which an expression is not expected to re-
turn any value at all and is evaluated for its side effects alone.
v-string
A aversiona or avectora string specified with a "v" followed by a se-
ries of decimal integers in dot notation, for instance,
"v1.20.300.4000". Each number turns into a character with the specified
ordinal value. (The "v" is optional when there are at least three inte-
gers.)
W
warning
A message printed to the "STDERR" stream to the effect that something
might be wrong but isnat worth blowing up over. See "warn" in Camel
chapter 27, aFunctionsa and the "warnings" pragma in Camel chapter 28,
aPragmantic Modulesa.
watch expression
An expression which, when its value changes, causes a breakpoint in the
Perl debugger.
weak reference
A reference that doesnat get counted normally. When all the normal ref-
erences to data disappear, the data disappears. These are useful for
circular references that would never disappear otherwise.
whitespace
A character that moves your cursor but doesnat otherwise put anything
on your screen. Typically refers to any of: space, tab, line feed, car-
riage return, or form feed. In Unicode, matches many other characters
that Unicode considers whitespace, including the E'-EE .
wordIn normal acomputeresea, the piece of data of the size most efficiently
handled by your computer, typically 32 bits or so, give or take a few
powers of 2. In Perl culture, it more often refers to an alphanumeric
identifier (including underscores), or to a string of nonwhitespace
characters bounded by whitespace or string boundaries.
working directory
Your current directory, from which relative pathnames are interpreted
by the operating system. The operating system knows your current direc-
tory because you told it with a "chdir", or because you started out in
the place where your parent process was when you were born.
wrapper
A program or subroutine that runs some other program or subroutine for
you, modifying some of its input or output to better suit your pur-
poses.
WYSIWYG
What You See Is What You Get. Usually used when something that appears
on the screen matches how it will eventually look, like Perlas "format"
declarations. Also used to mean the opposite of magic because every-
thing works exactly as it appears, as in the three- argument form of
"open".
X
XS An extraordinarily exported, expeditiously excellent, expressly eXter-
nal Subroutine, executed in existing C or C++ or in an exciting exten-
sion language called (exasperatingly) XS.
XSUBAn external subroutine defined in XS.
Y
yaccYet Another Compiler Compiler. A parser generator without which Perl
probably would not have existed. See the file perly.y in the Perl
source distribution.
Z
zero width
A subpattern assertion matching the null string between characters.
zombie
A process that has died (exited) but whose parent has not yet received
proper notification of its demise by virtue of having called "wait" or
"waitpid". If you "fork", you must clean up after your child processes
when they exit; otherwise, the process table will fill up and your sys-
tem administrator will Not Be Happy with you.
AUTHOR AND COPYRIGHT
Based on the Glossary of Programming Perl, Fourth Edition, by Tom Chris-
tiansen, brian d foy, Larry Wall, & Jon Orwant. Copyright (c) 2000, 1996,
1991, 2012 O'Reilly Media, Inc. This document may be distributed under the
same terms as Perl itself.
perl v5.44.0 2026-05-14 PERLGLOSSARY(1)