1PERLGLOSSARY(1) Perl Programmers Reference Guide PERLGLOSSARY(1)
2
3
4
6 perlglossary - Perl Glossary
7
9 A glossary of terms (technical and otherwise) used in the Perl documen‐
10 tation. Other useful sources include the Free On-Line Dictionary of
11 Computing <http://foldoc.doc.ic.ac.uk/foldoc/index.html>, the Jargon
12 File <http://catb.org/~esr/jargon/>, and Wikipedia
13 <http://www.wikipedia.org/>.
14
15 A
16
17 accessor methods
18 A "method" used to indirectly inspect or update an "object"'s state
19 (its instance variables).
20
21 actual arguments
22 The scalar values that you supply to a "function" or "subroutine"
23 when you call it. For instance, when you call "power("puff")", the
24 string "puff" is the actual argument. See also "argument" and
25 "formal arguments".
26
27 address operator
28 Some languages work directly with the memory addresses of values,
29 but this can be like playing with fire. Perl provides a set of
30 asbestos gloves for handling all memory management. The closest to
31 an address operator in Perl is the backslash operator, but it gives
32 you a "hard reference", which is much safer than a memory address.
33
34 algorithm
35 A well-defined sequence of steps, clearly enough explained that
36 even a computer could do them.
37
38 alias
39 A nickname for something, which behaves in all ways as though you'd
40 used the original name instead of the nickname. Temporary aliases
41 are implicitly created in the loop variable for "foreach" loops, in
42 the $_ variable for map or grep operators, in $a and $b during
43 sort's comparison function, and in each element of @_ for the
44 "actual arguments" of a subroutine call. Permanent aliases are
45 explicitly created in packages by importing symbols or by assign‐
46 ment to typeglobs. Lexically scoped aliases for package variables
47 are explicitly created by the our declaration.
48
49 alternatives
50 A list of possible choices from which you may select only one, as
51 in "Would you like door A, B, or C?" Alternatives in regular
52 expressions are separated with a single vertical bar: "⎪". Alter‐
53 natives in normal Perl expressions are separated with a double ver‐
54 tical bar: "⎪⎪". Logical alternatives in "Boolean" expressions are
55 separated with either "⎪⎪" or "or".
56
57 anonymous
58 Used to describe a "referent" that is not directly accessible
59 through a named "variable". Such a referent must be indirectly
60 accessible through at least one "hard reference". When the last
61 hard reference goes away, the anonymous referent is destroyed with‐
62 out pity.
63
64 architecture
65 The kind of computer you're working on, where one "kind" of com‐
66 puter means all those computers sharing a compatible machine lan‐
67 guage. Since Perl programs are (typically) simple text files, not
68 executable images, a Perl program is much less sensitive to the
69 architecture it's running on than programs in other languages, such
70 as C, that are compiled into machine code. See also "platform" and
71 "operating system".
72
73 argument
74 A piece of data supplied to a program, "subroutine", "function", or
75 "method" to tell it what it's supposed to do. Also called a
76 "parameter".
77
78 ARGV
79 The name of the array containing the "argument" "vector" from the
80 command line. If you use the empty "<>" operator, "ARGV" is the
81 name of both the "filehandle" used to traverse the arguments and
82 the "scalar" containing the name of the current input file.
83
84 arithmetical operator
85 A "symbol" such as "+" or "/" that tells Perl to do the arithmetic
86 you were supposed to learn in grade school.
87
88 array
89 An ordered sequence of values, stored such that you can easily
90 access any of the values using an integer "subscript" that speci‐
91 fies the value's "offset" in the sequence.
92
93 array context
94 An archaic expression for what is more correctly referred to as
95 "list context".
96
97 ASCII
98 The American Standard Code for Information Interchange (a 7-bit
99 character set adequate only for poorly representing English text).
100 Often used loosely to describe the lowest 128 values of the various
101 ISO-8859-X character sets, a bunch of mutually incompatible 8-bit
102 codes best described as half ASCII. See also "Unicode".
103
104 assertion
105 A component of a "regular expression" that must be true for the
106 pattern to match but does not necessarily match any characters
107 itself. Often used specifically to mean a "zero width" assertion.
108
109 assignment
110 An "operator" whose assigned mission in life is to change the value
111 of a "variable".
112
113 assignment operator
114 Either a regular "assignment", or a compound "operator" composed of
115 an ordinary assignment and some other operator, that changes the
116 value of a variable in place, that is, relative to its old value.
117 For example, "$a += 2" adds 2 to $a.
118
119 associative array
120 See "hash". Please.
121
122 associativity
123 Determines whether you do the left "operator" first or the right
124 "operator" first when you have "A "operator" B "operator" C" and
125 the two operators are of the same precedence. Operators like "+"
126 are left associative, while operators like "**" are right associa‐
127 tive. See perlop for a list of operators and their associativity.
128
129 asynchronous
130 Said of events or activities whose relative temporal ordering is
131 indeterminate because too many things are going on at once. Hence,
132 an asynchronous event is one you didn't know when to expect.
133
134 atom
135 A "regular expression" component potentially matching a "substring"
136 containing one or more characters and treated as an indivisible
137 syntactic unit by any following "quantifier". (Contrast with an
138 "assertion" that matches something of "zero width" and may not be
139 quantified.)
140
141 atomic operation
142 When Democritus gave the word "atom" to the indivisible bits of
143 matter, he meant literally something that could not be cut: a-
144 (not) + tomos (cuttable). An atomic operation is an action that
145 can't be interrupted, not one forbidden in a nuclear-free zone.
146
147 attribute
148 A new feature that allows the declaration of variables and subrou‐
149 tines with modifiers as in "sub foo : locked method". Also,
150 another name for an "instance variable" of an "object".
151
152 autogeneration
153 A feature of "operator overloading" of objects, whereby the behav‐
154 ior of certain operators can be reasonably deduced using more fun‐
155 damental operators. This assumes that the overloaded operators
156 will often have the same relationships as the regular operators.
157 See perlop.
158
159 autoincrement
160 To add one to something automatically, hence the name of the "++"
161 operator. To instead subtract one from something automatically is
162 known as an "autodecrement".
163
164 autoload
165 To load on demand. (Also called "lazy" loading.) Specifically, to
166 call an AUTOLOAD subroutine on behalf of an undefined subroutine.
167
168 autosplit
169 To split a string automatically, as the -a "switch" does when run‐
170 ning under -p or -n in order to emulate "awk". (See also the
171 AutoSplit module, which has nothing to do with the -a switch, but a
172 lot to do with autoloading.)
173
174 autovivification
175 A Greco-Roman word meaning "to bring oneself to life". In Perl,
176 storage locations (lvalues) spontaneously generate themselves as
177 needed, including the creation of any "hard reference" values to
178 point to the next level of storage. The assignment
179 "$a[5][5][5][5][5] = "quintet"" potentially creates five scalar
180 storage locations, plus four references (in the first four scalar
181 locations) pointing to four new anonymous arrays (to hold the last
182 four scalar locations). But the point of autovivification is that
183 you don't have to worry about it.
184
185 AV Short for "array value", which refers to one of Perl's internal
186 data types that holds an "array". The "AV" type is a subclass of
187 "SV".
188
189 awk Descriptive editing term--short for "awkward". Also coincidentally
190 refers to a venerable text-processing language from which Perl
191 derived some of its high-level ideas.
192
193 B
194
195 backreference
196 A substring captured by a subpattern within unadorned parentheses
197 in a "regex". Backslashed decimal numbers ("\1", "\2", etc.)
198 later in the same pattern refer back to the corresponding subpat‐
199 tern in the current match. Outside the pattern, the numbered vari‐
200 ables ($1, $2, etc.) continue to refer to these same values, as
201 long as the pattern was the last successful match of the current
202 dynamic scope.
203
204 backtracking
205 The practice of saying, "If I had to do it all over, I'd do it dif‐
206 ferently," and then actually going back and doing it all over dif‐
207 ferently. Mathematically speaking, it's returning from an unsuc‐
208 cessful recursion on a tree of possibilities. Perl backtracks when
209 it attempts to match patterns with a "regular expression", and its
210 earlier attempts don't pan out. See "Backtracking" in perlre.
211
212 backward compatibility
213 Means you can still run your old program because we didn't break
214 any of the features or bugs it was relying on.
215
216 bareword
217 A word sufficiently ambiguous to be deemed illegal under use strict
218 'subs'. In the absence of that stricture, a bareword is treated as
219 if quotes were around it.
220
221 base class
222 A generic "object" type; that is, a "class" from which other, more
223 specific classes are derived genetically by "inheritance". Also
224 called a "superclass" by people who respect their ancestors.
225
226 big-endian
227 From Swift: someone who eats eggs big end first. Also used of com‐
228 puters that store the most significant "byte" of a word at a lower
229 byte address than the least significant byte. Often considered
230 superior to little-endian machines. See also "little-endian".
231
232 binary
233 Having to do with numbers represented in base 2. That means
234 there's basically two numbers, 0 and 1. Also used to describe a
235 "non-text file", presumably because such a file makes full use of
236 all the binary bits in its bytes. With the advent of "Unicode",
237 this distinction, already suspect, loses even more of its meaning.
238
239 binary operator
240 An "operator" that takes two operands.
241
242 bind
243 To assign a specific "network address" to a "socket".
244
245 bit An integer in the range from 0 to 1, inclusive. The smallest pos‐
246 sible unit of information storage. An eighth of a "byte" or of a
247 dollar. (The term "Pieces of Eight" comes from being able to split
248 the old Spanish dollar into 8 bits, each of which still counted for
249 money. That's why a 25-cent piece today is still "two bits".)
250
251 bit shift
252 The movement of bits left or right in a computer word, which has
253 the effect of multiplying or dividing by a power of 2.
254
255 bit string
256 A sequence of bits that is actually being thought of as a sequence
257 of bits, for once.
258
259 bless
260 In corporate life, to grant official approval to a thing, as in,
261 "The VP of Engineering has blessed our WebCruncher project." Simi‐
262 larly in Perl, to grant official approval to a "referent" so that
263 it can function as an "object", such as a WebCruncher object. See
264 "bless" in perlfunc.
265
266 block
267 What a "process" does when it has to wait for something: "My
268 process blocked waiting for the disk." As an unrelated noun, it
269 refers to a large chunk of data, of a size that the "operating sys‐
270 tem" likes to deal with (normally a power of two such as 512 or
271 8192). Typically refers to a chunk of data that's coming from or
272 going to a disk file.
273
274 BLOCK
275 A syntactic construct consisting of a sequence of Perl statements
276 that is delimited by braces. The "if" and "while" statements are
277 defined in terms of BLOCKs, for instance. Sometimes we also say
278 "block" to mean a lexical scope; that is, a sequence of statements
279 that act like a "BLOCK", such as within an eval or a file, even
280 though the statements aren't delimited by braces.
281
282 block buffering
283 A method of making input and output efficient by passing one
284 "block" at a time. By default, Perl does block buffering to disk
285 files. See "buffer" and "command buffering".
286
287 Boolean
288 A value that is either "true" or "false".
289
290 Boolean context
291 A special kind of "scalar context" used in conditionals to decide
292 whether the "scalar value" returned by an expression is "true" or
293 "false". Does not evaluate as either a string or a number. See
294 "context".
295
296 breakpoint
297 A spot in your program where you've told the debugger to stop exe‐
298 cution so you can poke around and see whether anything is wrong
299 yet.
300
301 broadcast
302 To send a "datagram" to multiple destinations simultaneously.
303
304 BSD A psychoactive drug, popular in the 80s, probably developed at U.
305 C. Berkeley or thereabouts. Similar in many ways to the prescrip‐
306 tion-only medication called "System V", but infinitely more useful.
307 (Or, at least, more fun.) The full chemical name is "Berkeley
308 Standard Distribution".
309
310 bucket
311 A location in a "hash table" containing (potentially) multiple
312 entries whose keys "hash" to the same hash value according to its
313 hash function. (As internal policy, you don't have to worry about
314 it, unless you're into internals, or policy.)
315
316 buffer
317 A temporary holding location for data. Block buffering means that
318 the data is passed on to its destination whenever the buffer is
319 full. Line buffering means that it's passed on whenever a complete
320 line is received. Command buffering means that it's passed every
321 time you do a print command (or equivalent). If your output is
322 unbuffered, the system processes it one byte at a time without the
323 use of a holding area. This can be rather inefficient.
324
325 built-in
326 A "function" that is predefined in the language. Even when hidden
327 by "overriding", you can always get at a built-in function by qual‐
328 ifying its name with the "CORE::" pseudo-package.
329
330 bundle
331 A group of related modules on "CPAN". (Also, sometimes refers to a
332 group of command-line switches grouped into one "switch cluster".)
333
334 byte
335 A piece of data worth eight bits in most places.
336
337 bytecode
338 A pidgin-like language spoken among 'droids when they don't wish to
339 reveal their orientation (see "endian"). Named after some similar
340 languages spoken (for similar reasons) between compilers and inter‐
341 preters in the late 20th century. These languages are character‐
342 ized by representing everything as a non-architecture-dependent
343 sequence of bytes.
344
345 C
346
347 C A language beloved by many for its inside-out "type" definitions,
348 inscrutable "precedence" rules, and heavy "overloading" of the
349 function-call mechanism. (Well, actually, people first switched to
350 C because they found lowercase identifiers easier to read than
351 upper.) Perl is written in C, so it's not surprising that Perl
352 borrowed a few ideas from it.
353
354 C preprocessor
355 The typical C compiler's first pass, which processes lines begin‐
356 ning with "#" for conditional compilation and macro definition and
357 does various manipulations of the program text based on the current
358 definitions. Also known as cpp(1).
359
360 call by reference
361 An "argument"-passing mechanism in which the "formal arguments"
362 refer directly to the "actual arguments", and the "subroutine" can
363 change the actual arguments by changing the formal arguments. That
364 is, the formal argument is an "alias" for the actual argument. See
365 also "call by value".
366
367 call by value
368 An "argument"-passing mechanism in which the "formal arguments"
369 refer to a copy of the "actual arguments", and the "subroutine"
370 cannot change the actual arguments by changing the formal argu‐
371 ments. See also "call by reference".
372
373 callback
374 A "handler" that you register with some other part of your program
375 in the hope that the other part of your program will "trigger" your
376 handler when some event of interest transpires.
377
378 canonical
379 Reduced to a standard form to facilitate comparison.
380
381 capturing
382 The use of parentheses around a "subpattern" in a "regular expres‐
383 sion" to store the matched "substring" as a "backreference". (Cap‐
384 tured strings are also returned as a list in "list context".)
385
386 character
387 A small integer representative of a unit of orthography. Histori‐
388 cally, characters were usually stored as fixed-width integers (typ‐
389 ically in a byte, or maybe two, depending on the character set),
390 but with the advent of UTF-8, characters are often stored in a
391 variable number of bytes depending on the size of the integer that
392 represents the character. Perl manages this transparently for you,
393 for the most part.
394
395 character class
396 A square-bracketed list of characters used in a "regular expres‐
397 sion" to indicate that any character of the set may occur at a
398 given point. Loosely, any predefined set of characters so used.
399
400 character property
401 A predefined "character class" matchable by the "\p" "metasymbol".
402 Many standard properties are defined for "Unicode".
403
404 circumfix operator
405 An "operator" that surrounds its "operand", like the angle opera‐
406 tor, or parentheses, or a hug.
407
408 class
409 A user-defined "type", implemented in Perl via a "package" that
410 provides (either directly or by inheritance) methods (that is, sub‐
411 routines) to handle instances of the class (its objects). See also
412 "inheritance".
413
414 class method
415 A "method" whose "invocant" is a "package" name, not an "object"
416 reference. A method associated with the class as a whole.
417
418 client
419 In networking, a "process" that initiates contact with a "server"
420 process in order to exchange data and perhaps receive a service.
421
422 cloister
423 A "cluster" used to restrict the scope of a "regular expression
424 modifier".
425
426 closure
427 An "anonymous" subroutine that, when a reference to it is generated
428 at run time, keeps track of the identities of externally visible
429 lexical variables even after those lexical variables have suppos‐
430 edly gone out of "scope". They're called "closures" because this
431 sort of behavior gives mathematicians a sense of closure.
432
433 cluster
434 A parenthesized "subpattern" used to group parts of a "regular
435 expression" into a single "atom".
436
437 CODE
438 The word returned by the ref function when you apply it to a refer‐
439 ence to a subroutine. See also "CV".
440
441 code generator
442 A system that writes code for you in a low-level language, such as
443 code to implement the backend of a compiler. See "program genera‐
444 tor".
445
446 code subpattern
447 A "regular expression" subpattern whose real purpose is to execute
448 some Perl code, for example, the "(?{...})" and "(??{...})" subpat‐
449 terns.
450
451 collating sequence
452 The order into which characters sort. This is used by "string"
453 comparison routines to decide, for example, where in this glossary
454 to put "collating sequence".
455
456 command
457 In "shell" programming, the syntactic combination of a program name
458 and its arguments. More loosely, anything you type to a shell (a
459 command interpreter) that starts it doing something. Even more
460 loosely, a Perl "statement", which might start with a "label" and
461 typically ends with a semicolon.
462
463 command buffering
464 A mechanism in Perl that lets you store up the output of each Perl
465 "command" and then flush it out as a single request to the "operat‐
466 ing system". It's enabled by setting the $⎪ ($AUTOFLUSH) variable
467 to a true value. It's used when you don't want data sitting around
468 not going where it's supposed to, which may happen because the
469 default on a "file" or "pipe" is to use "block buffering".
470
471 command name
472 The name of the program currently executing, as typed on the com‐
473 mand line. In C, the "command" name is passed to the program as
474 the first command-line argument. In Perl, it comes in separately
475 as $0.
476
477 command-line arguments
478 The values you supply along with a program name when you tell a
479 "shell" to execute a "command". These values are passed to a Perl
480 program through @ARGV.
481
482 comment
483 A remark that doesn't affect the meaning of the program. In Perl,
484 a comment is introduced by a "#" character and continues to the end
485 of the line.
486
487 compilation unit
488 The "file" (or "string", in the case of eval) that is currently
489 being compiled.
490
491 compile phase
492 Any time before Perl starts running your main program. See also
493 "run phase". Compile phase is mostly spent in "compile time", but
494 may also be spent in "run time" when "BEGIN" blocks, use declara‐
495 tions, or constant subexpressions are being evaluated. The startup
496 and import code of any use declaration is also run during compile
497 phase.
498
499 compile time
500 The time when Perl is trying to make sense of your code, as opposed
501 to when it thinks it knows what your code means and is merely try‐
502 ing to do what it thinks your code says to do, which is "run time".
503
504 compiler
505 Strictly speaking, a program that munches up another program and
506 spits out yet another file containing the program in a "more exe‐
507 cutable" form, typically containing native machine instructions.
508 The perl program is not a compiler by this definition, but it does
509 contain a kind of compiler that takes a program and turns it into a
510 more executable form (syntax trees) within the perl process itself,
511 which the "interpreter" then interprets. There are, however,
512 extension modules to get Perl to act more like a "real" compiler.
513 See O.
514
515 composer
516 A "constructor" for a "referent" that isn't really an "object",
517 like an anonymous array or a hash (or a sonata, for that matter).
518 For example, a pair of braces acts as a composer for a hash, and a
519 pair of brackets acts as a composer for an array. See "Making Ref‐
520 erences" in perlref.
521
522 concatenation
523 The process of gluing one cat's nose to another cat's tail. Also,
524 a similar operation on two strings.
525
526 conditional
527 Something "iffy". See "Boolean context".
528
529 connection
530 In telephony, the temporary electrical circuit between the caller's
531 and the callee's phone. In networking, the same kind of temporary
532 circuit between a "client" and a "server".
533
534 construct
535 As a noun, a piece of syntax made up of smaller pieces. As a tran‐
536 sitive verb, to create an "object" using a "constructor".
537
538 constructor
539 Any "class method", instance "method", or "subroutine" that com‐
540 poses, initializes, blesses, and returns an "object". Sometimes we
541 use the term loosely to mean a "composer".
542
543 context
544 The surroundings, or environment. The context given by the sur‐
545 rounding code determines what kind of data a particular "expres‐
546 sion" is expected to return. The three primary contexts are "list
547 context", "scalar context", and "void context". Scalar context is
548 sometimes subdivided into "Boolean context", "numeric context",
549 "string context", and "void context". There's also a "don't care"
550 scalar context (which is dealt with in Programming Perl, Third Edi‐
551 tion, Chapter 2, "Bits and Pieces" if you care).
552
553 continuation
554 The treatment of more than one physical "line" as a single logical
555 line. "Makefile" lines are continued by putting a backslash before
556 the "newline". Mail headers as defined by RFC 822 are continued by
557 putting a space or tab after the newline. In general, lines in
558 Perl do not need any form of continuation mark, because "white‐
559 space" (including newlines) is gleefully ignored. Usually.
560
561 core dump
562 The corpse of a "process", in the form of a file left in the "work‐
563 ing directory" of the process, usually as a result of certain kinds
564 of fatal error.
565
566 CPAN
567 The Comprehensive Perl Archive Network. (See "What modules and
568 extensions are available for Perl? What is CPAN? What does
569 CPAN/src/... mean?" in perlfaq2).
570
571 cracker
572 Someone who breaks security on computer systems. A cracker may be
573 a true "hacker" or only a "script kiddie".
574
575 current package
576 The "package" in which the current statement is compiled. Scan
577 backwards in the text of your program through the current lexical
578 scope or any enclosing lexical scopes till you find a package dec‐
579 laration. That's your current package name.
580
581 current working directory
582 See "working directory".
583
584 currently selected output channel
585 The last "filehandle" that was designated with select("FILEHAN‐
586 DLE"); "STDOUT", if no filehandle has been selected.
587
588 CV An internal "code value" typedef, holding a "subroutine". The "CV"
589 type is a subclass of "SV".
590
591 D
592
593 dangling statement
594 A bare, single "statement", without any braces, hanging off an "if"
595 or "while" conditional. C allows them. Perl doesn't.
596
597 data structure
598 How your various pieces of data relate to each other and what shape
599 they make when you put them all together, as in a rectangular table
600 or a triangular-shaped tree.
601
602 data type
603 A set of possible values, together with all the operations that
604 know how to deal with those values. For example, a numeric data
605 type has a certain set of numbers that you can work with and vari‐
606 ous mathematical operations that you can do on the numbers but
607 would make little sense on, say, a string such as "Kilroy".
608 Strings have their own operations, such as "concatenation". Com‐
609 pound types made of a number of smaller pieces generally have oper‐
610 ations to compose and decompose them, and perhaps to rearrange
611 them. Objects that model things in the real world often have oper‐
612 ations that correspond to real activities. For instance, if you
613 model an elevator, your elevator object might have an "open_door()"
614 "method".
615
616 datagram
617 A packet of data, such as a "UDP" message, that (from the viewpoint
618 of the programs involved) can be sent independently over the net‐
619 work. (In fact, all packets are sent independently at the "IP"
620 level, but "stream" protocols such as "TCP" hide this from your
621 program.)
622
623 DBM Stands for "Data Base Management" routines, a set of routines that
624 emulate an "associative array" using disk files. The routines use
625 a dynamic hashing scheme to locate any entry with only two disk
626 accesses. DBM files allow a Perl program to keep a persistent
627 "hash" across multiple invocations. You can tie your hash vari‐
628 ables to various DBM implementations--see AnyDBM_File and DB_File.
629
630 declaration
631 An "assertion" that states something exists and perhaps describes
632 what it's like, without giving any commitment as to how or where
633 you'll use it. A declaration is like the part of your recipe that
634 says, "two cups flour, one large egg, four or five tadpoles..."
635 See "statement" for its opposite. Note that some declarations also
636 function as statements. Subroutine declarations also act as defi‐
637 nitions if a body is supplied.
638
639 decrement
640 To subtract a value from a variable, as in "decrement $x" (meaning
641 to remove 1 from its value) or "decrement $x by 3".
642
643 default
644 A "value" chosen for you if you don't supply a value of your own.
645
646 defined
647 Having a meaning. Perl thinks that some of the things people try
648 to do are devoid of meaning, in particular, making use of variables
649 that have never been given a "value" and performing certain opera‐
650 tions on data that isn't there. For example, if you try to read
651 data past the end of a file, Perl will hand you back an undefined
652 value. See also "false" and "defined" in perlfunc.
653
654 delimiter
655 A "character" or "string" that sets bounds to an arbitrarily-sized
656 textual object, not to be confused with a "separator" or "termina‐
657 tor". "To delimit" really just means "to surround" or "to enclose"
658 (like these parentheses are doing).
659
660 dereference
661 A fancy computer science term meaning "to follow a "reference" to
662 what it points to". The "de" part of it refers to the fact that
663 you're taking away one level of "indirection".
664
665 derived class
666 A "class" that defines some of its methods in terms of a more
667 generic class, called a "base class". Note that classes aren't
668 classified exclusively into base classes or derived classes: a
669 class can function as both a derived class and a base class simul‐
670 taneously, which is kind of classy.
671
672 descriptor
673 See "file descriptor".
674
675 destroy
676 To deallocate the memory of a "referent" (first triggering its
677 "DESTROY" method, if it has one).
678
679 destructor
680 A special "method" that is called when an "object" is thinking
681 about destroying itself. A Perl program's "DESTROY" method doesn't
682 do the actual destruction; Perl just triggers the method in case
683 the "class" wants to do any associated cleanup.
684
685 device
686 A whiz-bang hardware gizmo (like a disk or tape drive or a modem or
687 a joystick or a mouse) attached to your computer, that the "operat‐
688 ing system" tries to make look like a "file" (or a bunch of files).
689 Under Unix, these fake files tend to live in the /dev directory.
690
691 directive
692 A "pod" directive. See perlpod.
693
694 directory
695 A special file that contains other files. Some operating systems
696 call these "folders", "drawers", or "catalogs".
697
698 directory handle
699 A name that represents a particular instance of opening a directory
700 to read it, until you close it. See the opendir function.
701
702 dispatch
703 To send something to its correct destination. Often used metaphor‐
704 ically to indicate a transfer of programmatic control to a destina‐
705 tion selected algorithmically, often by lookup in a table of func‐
706 tion references or, in the case of object methods, by traversing
707 the inheritance tree looking for the most specific definition for
708 the method.
709
710 distribution
711 A standard, bundled release of a system of software. The default
712 usage implies source code is included. If that is not the case, it
713 will be called a "binary-only" distribution.
714
715 dweomer
716 An enchantment, illusion, phantasm, or jugglery. Said when Perl's
717 magical "dwimmer" effects don't do what you expect, but rather seem
718 to be the product of arcane dweomercraft, sorcery, or wonder work‐
719 ing. [From Old English]
720
721 dwimmer
722 DWIM is an acronym for "Do What I Mean", the principle that some‐
723 thing should just do what you want it to do without an undue amount
724 of fuss. A bit of code that does "dwimming" is a "dwimmer". Dwim‐
725 ming can require a great deal of behind-the-scenes magic, which (if
726 it doesn't stay properly behind the scenes) is called a "dweomer"
727 instead.
728
729 dynamic scoping
730 Dynamic scoping works over a dynamic scope, making variables visi‐
731 ble throughout the rest of the "block" in which they are first used
732 and in any subroutines that are called by the rest of the block.
733 Dynamically scoped variables can have their values temporarily
734 changed (and implicitly restored later) by a local operator. (Com‐
735 pare "lexical scoping".) Used more loosely to mean how a subrou‐
736 tine that is in the middle of calling another subroutine "contains"
737 that subroutine at "run time".
738
739 E
740
741 eclectic
742 Derived from many sources. Some would say too many.
743
744 element
745 A basic building block. When you're talking about an "array", it's
746 one of the items that make up the array.
747
748 embedding
749 When something is contained in something else, particularly when
750 that might be considered surprising: "I've embedded a complete Perl
751 interpreter in my editor!"
752
753 empty subclass test
754 The notion that an empty "derived class" should behave exactly like
755 its "base class".
756
757 en passant
758 When you change a "value" as it is being copied. [From French, "in
759 passing", as in the exotic pawn-capturing maneuver in chess.]
760
761 encapsulation
762 The veil of abstraction separating the "interface" from the "imple‐
763 mentation" (whether enforced or not), which mandates that all
764 access to an "object"'s state be through methods alone.
765
766 endian
767 See "little-endian" and "big-endian".
768
769 environment
770 The collective set of environment variables your "process" inherits
771 from its parent. Accessed via %ENV.
772
773 environment variable
774 A mechanism by which some high-level agent such as a user can pass
775 its preferences down to its future offspring (child processes,
776 grandchild processes, great-grandchild processes, and so on). Each
777 environment variable is a "key"/"value" pair, like one entry in a
778 "hash".
779
780 EOF End of File. Sometimes used metaphorically as the terminating
781 string of a "here document".
782
783 errno
784 The error number returned by a "syscall" when it fails. Perl
785 refers to the error by the name $! (or $OS_ERROR if you use the
786 English module).
787
788 error
789 See "exception" or "fatal error".
790
791 escape sequence
792 See "metasymbol".
793
794 exception
795 A fancy term for an error. See "fatal error".
796
797 exception handling
798 The way a program responds to an error. The exception handling
799 mechanism in Perl is the eval operator.
800
801 exec
802 To throw away the current "process"'s program and replace it with
803 another without exiting the process or relinquishing any resources
804 held (apart from the old memory image).
805
806 executable file
807 A "file" that is specially marked to tell the "operating system"
808 that it's okay to run this file as a program. Usually shortened to
809 "executable".
810
811 execute
812 To run a program or "subroutine". (Has nothing to do with the kill
813 built-in, unless you're trying to run a "signal handler".)
814
815 execute bit
816 The special mark that tells the operating system it can run this
817 program. There are actually three execute bits under Unix, and
818 which bit gets used depends on whether you own the file singularly,
819 collectively, or not at all.
820
821 exit status
822 See "status".
823
824 export
825 To make symbols from a "module" available for "import" by other
826 modules.
827
828 expression
829 Anything you can legally say in a spot where a "value" is required.
830 Typically composed of literals, variables, operators, functions,
831 and "subroutine" calls, not necessarily in that order.
832
833 extension
834 A Perl module that also pulls in compiled C or C++ code. More gen‐
835 erally, any experimental option that can be compiled into Perl,
836 such as multithreading.
837
838 F
839
840 false
841 In Perl, any value that would look like "" or "0" if evaluated in a
842 string context. Since undefined values evaluate to "", all unde‐
843 fined values are false, but not all false values are undefined.
844
845 FAQ Frequently Asked Question (although not necessarily frequently
846 answered, especially if the answer appears in the Perl FAQ shipped
847 standard with Perl).
848
849 fatal error
850 An uncaught "exception", which causes termination of the "process"
851 after printing a message on your "standard error" stream. Errors
852 that happen inside an eval are not fatal. Instead, the eval termi‐
853 nates after placing the exception message in the $@ ($EVAL_ERROR)
854 variable. You can try to provoke a fatal error with the die opera‐
855 tor (known as throwing or raising an exception), but this may be
856 caught by a dynamically enclosing eval. If not caught, the die
857 becomes a fatal error.
858
859 field
860 A single piece of numeric or string data that is part of a longer
861 "string", "record", or "line". Variable-width fields are usually
862 split up by separators (so use split to extract the fields), while
863 fixed-width fields are usually at fixed positions (so use unpack).
864 Instance variables are also known as fields.
865
866 FIFO
867 First In, First Out. See also "LIFO". Also, a nickname for a
868 "named pipe".
869
870 file
871 A named collection of data, usually stored on disk in a "directory"
872 in a "filesystem". Roughly like a document, if you're into office
873 metaphors. In modern filesystems, you can actually give a file
874 more than one name. Some files have special properties, like
875 directories and devices.
876
877 file descriptor
878 The little number the "operating system" uses to keep track of
879 which opened "file" you're talking about. Perl hides the file
880 descriptor inside a "standard I/O" stream and then attaches the
881 stream to a "filehandle".
882
883 file test operator
884 A built-in unary operator that you use to determine whether some‐
885 thing is "true" about a file, such as "-o $filename" to test
886 whether you're the owner of the file.
887
888 fileglob
889 A "wildcard" match on filenames. See the glob function.
890
891 filehandle
892 An identifier (not necessarily related to the real name of a file)
893 that represents a particular instance of opening a file until you
894 close it. If you're going to open and close several different
895 files in succession, it's fine to open each of them with the same
896 filehandle, so you don't have to write out separate code to process
897 each file.
898
899 filename
900 One name for a file. This name is listed in a "directory", and you
901 can use it in an open to tell the "operating system" exactly which
902 file you want to open, and associate the file with a "filehandle"
903 which will carry the subsequent identity of that file in your pro‐
904 gram, until you close it.
905
906 filesystem
907 A set of directories and files residing on a partition of the disk.
908 Sometimes known as a "partition". You can change the file's name
909 or even move a file around from directory to directory within a
910 filesystem without actually moving the file itself, at least under
911 Unix.
912
913 filter
914 A program designed to take a "stream" of input and transform it
915 into a stream of output.
916
917 flag
918 We tend to avoid this term because it means so many things. It may
919 mean a command-line "switch" that takes no argument itself (such as
920 Perl's -n and -p flags) or, less frequently, a single-bit indicator
921 (such as the "O_CREAT" and "O_EXCL" flags used in sysopen).
922
923 floating point
924 A method of storing numbers in "scientific notation", such that the
925 precision of the number is independent of its magnitude (the deci‐
926 mal point "floats"). Perl does its numeric work with floating-
927 point numbers (sometimes called "floats"), when it can't get away
928 with using integers. Floating-point numbers are mere approxima‐
929 tions of real numbers.
930
931 flush
932 The act of emptying a "buffer", often before it's full.
933
934 FMTEYEWTK
935 Far More Than Everything You Ever Wanted To Know. An exhaustive
936 treatise on one narrow topic, something of a super-"FAQ". See Tom
937 for far more.
938
939 fork
940 To create a child "process" identical to the parent process at its
941 moment of conception, at least until it gets ideas of its own. A
942 thread with protected memory.
943
944 formal arguments
945 The generic names by which a "subroutine" knows its arguments. In
946 many languages, formal arguments are always given individual names,
947 but in Perl, the formal arguments are just the elements of an
948 array. The formal arguments to a Perl program are $ARGV[0],
949 $ARGV[1], and so on. Similarly, the formal arguments to a Perl
950 subroutine are $_[0], $_[1], and so on. You may give the arguments
951 individual names by assigning the values to a my list. See also
952 "actual arguments".
953
954 format
955 A specification of how many spaces and digits and things to put
956 somewhere so that whatever you're printing comes out nice and
957 pretty.
958
959 freely available
960 Means you don't have to pay money to get it, but the copyright on
961 it may still belong to someone else (like Larry).
962
963 freely redistributable
964 Means you're not in legal trouble if you give a bootleg copy of it
965 to your friends and we find out about it. In fact, we'd rather you
966 gave a copy to all your friends.
967
968 freeware
969 Historically, any software that you give away, particularly if you
970 make the source code available as well. Now often called "open
971 source software". Recently there has been a trend to use the term
972 in contradistinction to "open source software", to refer only to
973 free software released under the Free Software Foundation's GPL
974 (General Public License), but this is difficult to justify etymo‐
975 logically.
976
977 function
978 Mathematically, a mapping of each of a set of input values to a
979 particular output value. In computers, refers to a "subroutine" or
980 "operator" that returns a "value". It may or may not have input
981 values (called arguments).
982
983 funny character
984 Someone like Larry, or one of his peculiar friends. Also refers to
985 the strange prefixes that Perl requires as noun markers on its
986 variables.
987
988 garbage collection
989 A misnamed feature--it should be called, "expecting your mother to
990 pick up after you". Strictly speaking, Perl doesn't do this, but
991 it relies on a reference-counting mechanism to keep things tidy.
992 However, we rarely speak strictly and will often refer to the ref‐
993 erence-counting scheme as a form of garbage collection. (If it's
994 any comfort, when your interpreter exits, a "real" garbage collec‐
995 tor runs to make sure everything is cleaned up if you've been messy
996 with circular references and such.)
997
998 G
999
1000 GID Group ID--in Unix, the numeric group ID that the "operating system"
1001 uses to identify you and members of your "group".
1002
1003 glob
1004 Strictly, the shell's "*" character, which will match a "glob" of
1005 characters when you're trying to generate a list of filenames.
1006 Loosely, the act of using globs and similar symbols to do pattern
1007 matching. See also "fileglob" and "typeglob".
1008
1009 global
1010 Something you can see from anywhere, usually used of variables and
1011 subroutines that are visible everywhere in your program. In Perl,
1012 only certain special variables are truly global--most variables
1013 (and all subroutines) exist only in the current "package". Global
1014 variables can be declared with our. See "our" in perlfunc.
1015
1016 global destruction
1017 The "garbage collection" of globals (and the running of any associ‐
1018 ated object destructors) that takes place when a Perl "interpreter"
1019 is being shut down. Global destruction should not be confused with
1020 the Apocalypse, except perhaps when it should.
1021
1022 glue language
1023 A language such as Perl that is good at hooking things together
1024 that weren't intended to be hooked together.
1025
1026 granularity
1027 The size of the pieces you're dealing with, mentally speaking.
1028
1029 greedy
1030 A "subpattern" whose "quantifier" wants to match as many things as
1031 possible.
1032
1033 grep
1034 Originally from the old Unix editor command for "Globally search
1035 for a Regular Expression and Print it", now used in the general
1036 sense of any kind of search, especially text searches. Perl has a
1037 built-in grep function that searches a list for elements matching
1038 any given criterion, whereas the grep(1) program searches for lines
1039 matching a "regular expression" in one or more files.
1040
1041 group
1042 A set of users of which you are a member. In some operating sys‐
1043 tems (like Unix), you can give certain file access permissions to
1044 other members of your group.
1045
1046 GV An internal "glob value" typedef, holding a "typeglob". The "GV"
1047 type is a subclass of "SV".
1048
1049 H
1050
1051 hacker
1052 Someone who is brilliantly persistent in solving technical prob‐
1053 lems, whether these involve golfing, fighting orcs, or programming.
1054 Hacker is a neutral term, morally speaking. Good hackers are not
1055 to be confused with evil crackers or clueless script kiddies. If
1056 you confuse them, we will presume that you are either evil or clue‐
1057 less.
1058
1059 handler
1060 A "subroutine" or "method" that is called by Perl when your program
1061 needs to respond to some internal event, such as a "signal", or an
1062 encounter with an operator subject to "operator overloading". See
1063 also "callback".
1064
1065 hard reference
1066 A "scalar" "value" containing the actual address of a "referent",
1067 such that the referent's "reference" count accounts for it. (Some
1068 hard references are held internally, such as the implicit reference
1069 from one of a "typeglob"'s variable slots to its corresponding ref‐
1070 erent.) A hard reference is different from a "symbolic reference".
1071
1072 hash
1073 An unordered association of "key"/"value" pairs, stored such that
1074 you can easily use a string "key" to look up its associated data
1075 "value". This glossary is like a hash, where the word to be
1076 defined is the key, and the definition is the value. A hash is
1077 also sometimes septisyllabically called an "associative array",
1078 which is a pretty good reason for simply calling it a "hash"
1079 instead.
1080
1081 hash table
1082 A data structure used internally by Perl for implementing associa‐
1083 tive arrays (hashes) efficiently. See also "bucket".
1084
1085 header file
1086 A file containing certain required definitions that you must
1087 include "ahead" of the rest of your program to do certain obscure
1088 operations. A C header file has a .h extension. Perl doesn't
1089 really have header files, though historically Perl has sometimes
1090 used translated .h files with a .ph extension. See "require" in
1091 perlfunc. (Header files have been superseded by the "module" mech‐
1092 anism.)
1093
1094 here document
1095 So called because of a similar construct in shells that pretends
1096 that the lines following the "command" are a separate "file" to be
1097 fed to the command, up to some terminating string. In Perl, how‐
1098 ever, it's just a fancy form of quoting.
1099
1100 hexadecimal
1101 A number in base 16, "hex" for short. The digits for 10 through 16
1102 are customarily represented by the letters "a" through "f". Hexa‐
1103 decimal constants in Perl start with "0x". See also "hex" in perl‐
1104 func.
1105
1106 home directory
1107 The directory you are put into when you log in. On a Unix system,
1108 the name is often placed into $ENV{HOME} or $ENV{LOGDIR} by login,
1109 but you can also find it with "(getpwuid($<))[7]". (Some platforms
1110 do not have a concept of a home directory.)
1111
1112 host
1113 The computer on which a program or other data resides.
1114
1115 hubris
1116 Excessive pride, the sort of thing Zeus zaps you for. Also the
1117 quality that makes you write (and maintain) programs that other
1118 people won't want to say bad things about. Hence, the third great
1119 virtue of a programmer. See also "laziness" and "impatience".
1120
1121 HV Short for a "hash value" typedef, which holds Perl's internal rep‐
1122 resentation of a hash. The "HV" type is a subclass of "SV".
1123
1124 I
1125
1126 identifier
1127 A legally formed name for most anything in which a computer program
1128 might be interested. Many languages (including Perl) allow identi‐
1129 fiers that start with a letter and contain letters and digits.
1130 Perl also counts the underscore character as a valid letter. (Perl
1131 also has more complicated names, such as "qualified" names.)
1132
1133 impatience
1134 The anger you feel when the computer is being lazy. This makes you
1135 write programs that don't just react to your needs, but actually
1136 anticipate them. Or at least that pretend to. Hence, the second
1137 great virtue of a programmer. See also "laziness" and "hubris".
1138
1139 implementation
1140 How a piece of code actually goes about doing its job. Users of
1141 the code should not count on implementation details staying the
1142 same unless they are part of the published "interface".
1143
1144 import
1145 To gain access to symbols that are exported from another module.
1146 See "use" in perlfunc.
1147
1148 increment
1149 To increase the value of something by 1 (or by some other number,
1150 if so specified).
1151
1152 indexing
1153 In olden days, the act of looking up a "key" in an actual index
1154 (such as a phone book), but now merely the act of using any kind of
1155 key or position to find the corresponding "value", even if no index
1156 is involved. Things have degenerated to the point that Perl's
1157 index function merely locates the position (index) of one string in
1158 another.
1159
1160 indirect filehandle
1161 An "expression" that evaluates to something that can be used as a
1162 "filehandle": a "string" (filehandle name), a "typeglob", a type‐
1163 glob "reference", or a low-level "IO" object.
1164
1165 indirect object
1166 In English grammar, a short noun phrase between a verb and its
1167 direct object indicating the beneficiary or recipient of the
1168 action. In Perl, "print STDOUT "$foo\n";" can be understood as
1169 "verb indirect-object object" where "STDOUT" is the recipient of
1170 the print action, and "$foo" is the object being printed. Simi‐
1171 larly, when invoking a "method", you might place the invocant
1172 between the method and its arguments:
1173
1174 $gollum = new Pathetic::Creature "Smeagol";
1175 give $gollum "Fisssssh!";
1176 give $gollum "Precious!";
1177
1178 indirect object slot
1179 The syntactic position falling between a method call and its argu‐
1180 ments when using the indirect object invocation syntax. (The slot
1181 is distinguished by the absence of a comma between it and the next
1182 argument.) "STDERR" is in the indirect object slot here:
1183
1184 print STDERR "Awake! Awake! Fear, Fire,
1185 Foes! Awake!\n";
1186
1187 indirection
1188 If something in a program isn't the value you're looking for but
1189 indicates where the value is, that's indirection. This can be done
1190 with either symbolic references or hard references.
1191
1192 infix
1193 An "operator" that comes in between its operands, such as multipli‐
1194 cation in "24 * 7".
1195
1196 inheritance
1197 What you get from your ancestors, genetically or otherwise. If you
1198 happen to be a "class", your ancestors are called base classes and
1199 your descendants are called derived classes. See "single inheri‐
1200 tance" and "multiple inheritance".
1201
1202 instance
1203 Short for "an instance of a class", meaning an "object" of that
1204 "class".
1205
1206 instance variable
1207 An "attribute" of an "object"; data stored with the particular
1208 object rather than with the class as a whole.
1209
1210 integer
1211 A number with no fractional (decimal) part. A counting number,
1212 like 1, 2, 3, and so on, but including 0 and the negatives.
1213
1214 interface
1215 The services a piece of code promises to provide forever, in con‐
1216 trast to its "implementation", which it should feel free to change
1217 whenever it likes.
1218
1219 interpolation
1220 The insertion of a scalar or list value somewhere in the middle of
1221 another value, such that it appears to have been there all along.
1222 In Perl, variable interpolation happens in double-quoted strings
1223 and patterns, and list interpolation occurs when constructing the
1224 list of values to pass to a list operator or other such construct
1225 that takes a "LIST".
1226
1227 interpreter
1228 Strictly speaking, a program that reads a second program and does
1229 what the second program says directly without turning the program
1230 into a different form first, which is what compilers do. Perl is
1231 not an interpreter by this definition, because it contains a kind
1232 of compiler that takes a program and turns it into a more exe‐
1233 cutable form (syntax trees) within the perl process itself, which
1234 the Perl "run time" system then interprets.
1235
1236 invocant
1237 The agent on whose behalf a "method" is invoked. In a "class"
1238 method, the invocant is a package name. In an "instance" method,
1239 the invocant is an object reference.
1240
1241 invocation
1242 The act of calling up a deity, daemon, program, method, subroutine,
1243 or function to get it do what you think it's supposed to do. We
1244 usually "call" subroutines but "invoke" methods, since it sounds
1245 cooler.
1246
1247 I/O Input from, or output to, a "file" or "device".
1248
1249 IO An internal I/O object. Can also mean "indirect object".
1250
1251 IP Internet Protocol, or Intellectual Property.
1252
1253 IPC Interprocess Communication.
1254
1255 is-a
1256 A relationship between two objects in which one object is consid‐
1257 ered to be a more specific version of the other, generic object: "A
1258 camel is a mammal." Since the generic object really only exists in
1259 a Platonic sense, we usually add a little abstraction to the notion
1260 of objects and think of the relationship as being between a generic
1261 "base class" and a specific "derived class". Oddly enough, Pla‐
1262 tonic classes don't always have Platonic relationships--see "inher‐
1263 itance".
1264
1265 iteration
1266 Doing something repeatedly.
1267
1268 iterator
1269 A special programming gizmo that keeps track of where you are in
1270 something that you're trying to iterate over. The "foreach" loop
1271 in Perl contains an iterator; so does a hash, allowing you to each
1272 through it.
1273
1274 IV The integer four, not to be confused with six, Tom's favorite edi‐
1275 tor. IV also means an internal Integer Value of the type a
1276 "scalar" can hold, not to be confused with an "NV".
1277
1278 J
1279
1280 JAPH
1281 "Just Another Perl Hacker," a clever but cryptic bit of Perl code
1282 that when executed, evaluates to that string. Often used to illus‐
1283 trate a particular Perl feature, and something of an ungoing Obfus‐
1284 cated Perl Contest seen in Usenix signatures.
1285
1286 K
1287
1288 key The string index to a "hash", used to look up the "value" associ‐
1289 ated with that key.
1290
1291 keyword
1292 See "reserved words".
1293
1294 L
1295
1296 label
1297 A name you give to a "statement" so that you can talk about that
1298 statement elsewhere in the program.
1299
1300 laziness
1301 The quality that makes you go to great effort to reduce overall
1302 energy expenditure. It makes you write labor-saving programs that
1303 other people will find useful, and document what you wrote so you
1304 don't have to answer so many questions about it. Hence, the first
1305 great virtue of a programmer. Also hence, this book. See also
1306 "impatience" and "hubris".
1307
1308 left shift
1309 A "bit shift" that multiplies the number by some power of 2.
1310
1311 leftmost longest
1312 The preference of the "regular expression" engine to match the
1313 leftmost occurrence of a "pattern", then given a position at which
1314 a match will occur, the preference for the longest match (presuming
1315 the use of a "greedy" quantifier). See perlre for much more on
1316 this subject.
1317
1318 lexeme
1319 Fancy term for a "token".
1320
1321 lexer
1322 Fancy term for a "tokener".
1323
1324 lexical analysis
1325 Fancy term for "tokenizing".
1326
1327 lexical scoping
1328 Looking at your Oxford English Dictionary through a microscope.
1329 (Also known as "static scoping", because dictionaries don't change
1330 very fast.) Similarly, looking at variables stored in a private
1331 dictionary (namespace) for each scope, which are visible only from
1332 their point of declaration down to the end of the lexical scope in
1333 which they are declared. --Syn. "static scoping". --Ant. "dynamic
1334 scoping".
1335
1336 lexical variable
1337 A "variable" subject to "lexical scoping", declared by my. Often
1338 just called a "lexical". (The our declaration declares a lexically
1339 scoped name for a global variable, which is not itself a lexical
1340 variable.)
1341
1342 library
1343 Generally, a collection of procedures. In ancient days, referred
1344 to a collection of subroutines in a .pl file. In modern times,
1345 refers more often to the entire collection of Perl modules on your
1346 system.
1347
1348 LIFO
1349 Last In, First Out. See also "FIFO". A LIFO is usually called a
1350 "stack".
1351
1352 line
1353 In Unix, a sequence of zero or more non-newline characters termi‐
1354 nated with a "newline" character. On non-Unix machines, this is
1355 emulated by the C library even if the underlying "operating system"
1356 has different ideas.
1357
1358 line buffering
1359 Used by a "standard I/O" output stream that flushes its "buffer"
1360 after every "newline". Many standard I/O libraries automatically
1361 set up line buffering on output that is going to the terminal.
1362
1363 line number
1364 The number of lines read previous to this one, plus 1. Perl keeps
1365 a separate line number for each source or input file it opens. The
1366 current source file's line number is represented by "__LINE__".
1367 The current input line number (for the file that was most recently
1368 read via "<FH>") is represented by the $. ($INPUT_LINE_NUMBER)
1369 variable. Many error messages report both values, if available.
1370
1371 link
1372 Used as a noun, a name in a "directory", representing a "file". A
1373 given file can have multiple links to it. It's like having the
1374 same phone number listed in the phone directory under different
1375 names. As a verb, to resolve a partially compiled file's unre‐
1376 solved symbols into a (nearly) executable image. Linking can gen‐
1377 erally be static or dynamic, which has nothing to do with static or
1378 dynamic scoping.
1379
1380 LIST
1381 A syntactic construct representing a comma-separated list of
1382 expressions, evaluated to produce a "list value". Each "expres‐
1383 sion" in a "LIST" is evaluated in "list context" and interpolated
1384 into the list value.
1385
1386 list
1387 An ordered set of scalar values.
1388
1389 list context
1390 The situation in which an "expression" is expected by its surround‐
1391 ings (the code calling it) to return a list of values rather than a
1392 single value. Functions that want a "LIST" of arguments tell those
1393 arguments that they should produce a list value. See also "con‐
1394 text".
1395
1396 list operator
1397 An "operator" that does something with a list of values, such as
1398 join or grep. Usually used for named built-in operators (such as
1399 print, unlink, and system) that do not require parentheses around
1400 their "argument" list.
1401
1402 list value
1403 An unnamed list of temporary scalar values that may be passed
1404 around within a program from any list-generating function to any
1405 function or construct that provides a "list context".
1406
1407 literal
1408 A token in a programming language such as a number or "string" that
1409 gives you an actual "value" instead of merely representing possible
1410 values as a "variable" does.
1411
1412 little-endian
1413 From Swift: someone who eats eggs little end first. Also used of
1414 computers that store the least significant "byte" of a word at a
1415 lower byte address than the most significant byte. Often consid‐
1416 ered superior to big-endian machines. See also "big-endian".
1417
1418 local
1419 Not meaning the same thing everywhere. A global variable in Perl
1420 can be localized inside a dynamic scope via the local operator.
1421
1422 logical operator
1423 Symbols representing the concepts "and", "or", "xor", and "not".
1424
1425 lookahead
1426 An "assertion" that peeks at the string to the right of the current
1427 match location.
1428
1429 lookbehind
1430 An "assertion" that peeks at the string to the left of the current
1431 match location.
1432
1433 loop
1434 A construct that performs something repeatedly, like a roller
1435 coaster.
1436
1437 loop control statement
1438 Any statement within the body of a loop that can make a loop prema‐
1439 turely stop looping or skip an "iteration". Generally you
1440 shouldn't try this on roller coasters.
1441
1442 loop label
1443 A kind of key or name attached to a loop (or roller coaster) so
1444 that loop control statements can talk about which loop they want to
1445 control.
1446
1447 lvaluable
1448 Able to serve as an "lvalue".
1449
1450 lvalue
1451 Term used by language lawyers for a storage location you can assign
1452 a new "value" to, such as a "variable" or an element of an "array".
1453 The "l" is short for "left", as in the left side of an assignment,
1454 a typical place for lvalues. An "lvaluable" function or expression
1455 is one to which a value may be assigned, as in "pos($x) = 10".
1456
1457 lvalue modifier
1458 An adjectival pseudofunction that warps the meaning of an "lvalue"
1459 in some declarative fashion. Currently there are three lvalue mod‐
1460 ifiers: my, our, and local.
1461
1462 M
1463
1464 magic
1465 Technically speaking, any extra semantics attached to a variable
1466 such as $!, $0, %ENV, or %SIG, or to any tied variable. Magical
1467 things happen when you diddle those variables.
1468
1469 magical increment
1470 An "increment" operator that knows how to bump up alphabetics as
1471 well as numbers.
1472
1473 magical variables
1474 Special variables that have side effects when you access them or
1475 assign to them. For example, in Perl, changing elements of the
1476 %ENV array also changes the corresponding environment variables
1477 that subprocesses will use. Reading the $! variable gives you the
1478 current system error number or message.
1479
1480 Makefile
1481 A file that controls the compilation of a program. Perl programs
1482 don't usually need a "Makefile" because the Perl compiler has
1483 plenty of self-control.
1484
1485 man The Unix program that displays online documentation (manual pages)
1486 for you.
1487
1488 manpage
1489 A "page" from the manuals, typically accessed via the man(1) com‐
1490 mand. A manpage contains a SYNOPSIS, a DESCRIPTION, a list of
1491 BUGS, and so on, and is typically longer than a page. There are
1492 manpages documenting commands, syscalls, "library" functions,
1493 devices, protocols, files, and such. In this book, we call any
1494 piece of standard Perl documentation (like perlop or perldelta) a
1495 manpage, no matter what format it's installed in on your system.
1496
1497 matching
1498 See "pattern matching".
1499
1500 member data
1501 See "instance variable".
1502
1503 memory
1504 This always means your main memory, not your disk. Clouding the
1505 issue is the fact that your machine may implement "virtual" memory;
1506 that is, it will pretend that it has more memory than it really
1507 does, and it'll use disk space to hold inactive bits. This can
1508 make it seem like you have a little more memory than you really do,
1509 but it's not a substitute for real memory. The best thing that can
1510 be said about virtual memory is that it lets your performance
1511 degrade gradually rather than suddenly when you run out of real
1512 memory. But your program can die when you run out of virtual mem‐
1513 ory too, if you haven't thrashed your disk to death first.
1514
1515 metacharacter
1516 A "character" that is not supposed to be treated normally. Which
1517 characters are to be treated specially as metacharacters varies
1518 greatly from context to context. Your "shell" will have certain
1519 metacharacters, double-quoted Perl strings have other metacharac‐
1520 ters, and "regular expression" patterns have all the double-quote
1521 metacharacters plus some extra ones of their own.
1522
1523 metasymbol
1524 Something we'd call a "metacharacter" except that it's a sequence
1525 of more than one character. Generally, the first character in the
1526 sequence must be a true metacharacter to get the other characters
1527 in the metasymbol to misbehave along with it.
1528
1529 method
1530 A kind of action that an "object" can take if you tell it to. See
1531 perlobj.
1532
1533 minimalism
1534 The belief that "small is beautiful." Paradoxically, if you say
1535 something in a small language, it turns out big, and if you say it
1536 in a big language, it turns out small. Go figure.
1537
1538 mode
1539 In the context of the stat syscall, refers to the field holding the
1540 "permission bits" and the type of the "file".
1541
1542 modifier
1543 See "statement modifier", "regular expression modifier", and
1544 "lvalue modifier", not necessarily in that order.
1545
1546 module
1547 A "file" that defines a "package" of (almost) the same name, which
1548 can either "export" symbols or function as an "object" class. (A
1549 module's main .pm file may also load in other files in support of
1550 the module.) See the use built-in.
1551
1552 modulus
1553 An integer divisor when you're interested in the remainder instead
1554 of the quotient.
1555
1556 monger
1557 Short for Perl Monger, a purveyor of Perl.
1558
1559 mortal
1560 A temporary value scheduled to die when the current statement fin‐
1561 ishes.
1562
1563 multidimensional array
1564 An array with multiple subscripts for finding a single element.
1565 Perl implements these using references--see perllol and perldsc.
1566
1567 multiple inheritance
1568 The features you got from your mother and father, mixed together
1569 unpredictably. (See also "inheritance", and "single inheritance".)
1570 In computer languages (including Perl), the notion that a given
1571 class may have multiple direct ancestors or base classes.
1572
1573 N
1574
1575 named pipe
1576 A "pipe" with a name embedded in the "filesystem" so that it can be
1577 accessed by two unrelated processes.
1578
1579 namespace
1580 A domain of names. You needn't worry about whether the names in
1581 one such domain have been used in another. See "package".
1582
1583 network address
1584 The most important attribute of a socket, like your telephone's
1585 telephone number. Typically an IP address. See also "port".
1586
1587 newline
1588 A single character that represents the end of a line, with the
1589 ASCII value of 012 octal under Unix (but 015 on a Mac), and repre‐
1590 sented by "\n" in Perl strings. For Windows machines writing text
1591 files, and for certain physical devices like terminals, the single
1592 newline gets automatically translated by your C library into a line
1593 feed and a carriage return, but normally, no translation is done.
1594
1595 NFS Network File System, which allows you to mount a remote filesystem
1596 as if it were local.
1597
1598 null character
1599 A character with the ASCII value of zero. It's used by C to termi‐
1600 nate strings, but Perl allows strings to contain a null.
1601
1602 null list
1603 A "list value" with zero elements, represented in Perl by "()".
1604
1605 null string
1606 A "string" containing no characters, not to be confused with a
1607 string containing a "null character", which has a positive length
1608 and is "true".
1609
1610 numeric context
1611 The situation in which an expression is expected by its surround‐
1612 ings (the code calling it) to return a number. See also "context"
1613 and "string context".
1614
1615 NV Short for Nevada, no part of which will ever be confused with civi‐
1616 lization. NV also means an internal floating-point Numeric Value
1617 of the type a "scalar" can hold, not to be confused with an "IV".
1618
1619 nybble
1620 Half a "byte", equivalent to one "hexadecimal" digit, and worth
1621 four bits.
1622
1623 O
1624
1625 object
1626 An "instance" of a "class". Something that "knows" what user-
1627 defined type (class) it is, and what it can do because of what
1628 class it is. Your program can request an object to do things, but
1629 the object gets to decide whether it wants to do them or not. Some
1630 objects are more accommodating than others.
1631
1632 octal
1633 A number in base 8. Only the digits 0 through 7 are allowed.
1634 Octal constants in Perl start with 0, as in 013. See also the oct
1635 function.
1636
1637 offset
1638 How many things you have to skip over when moving from the begin‐
1639 ning of a string or array to a specific position within it. Thus,
1640 the minimum offset is zero, not one, because you don't skip any‐
1641 thing to get to the first item.
1642
1643 one-liner
1644 An entire computer program crammed into one line of text.
1645
1646 open source software
1647 Programs for which the source code is freely available and freely
1648 redistributable, with no commercial strings attached. For a more
1649 detailed definition, see <http://www.opensource.org/osd.html>.
1650
1651 operand
1652 An "expression" that yields a "value" that an "operator" operates
1653 on. See also "precedence".
1654
1655 operating system
1656 A special program that runs on the bare machine and hides the gory
1657 details of managing processes and devices. Usually used in a
1658 looser sense to indicate a particular culture of programming. The
1659 loose sense can be used at varying levels of specificity. At one
1660 extreme, you might say that all versions of Unix and Unix-looka‐
1661 likes are the same operating system (upsetting many people, espe‐
1662 cially lawyers and other advocates). At the other extreme, you
1663 could say this particular version of this particular vendor's oper‐
1664 ating system is different from any other version of this or any
1665 other vendor's operating system. Perl is much more portable across
1666 operating systems than many other languages. See also "architec‐
1667 ture" and "platform".
1668
1669 operator
1670 A gizmo that transforms some number of input values to some number
1671 of output values, often built into a language with a special syntax
1672 or symbol. A given operator may have specific expectations about
1673 what types of data you give as its arguments (operands) and what
1674 type of data you want back from it.
1675
1676 operator overloading
1677 A kind of "overloading" that you can do on built-in operators to
1678 make them work on objects as if the objects were ordinary scalar
1679 values, but with the actual semantics supplied by the object class.
1680 This is set up with the overload "pragma".
1681
1682 options
1683 See either switches or "regular expression modifier".
1684
1685 overloading
1686 Giving additional meanings to a symbol or construct. Actually, all
1687 languages do overloading to one extent or another, since people are
1688 good at figuring out things from "context".
1689
1690 overriding
1691 Hiding or invalidating some other definition of the same name.
1692 (Not to be confused with "overloading", which adds definitions that
1693 must be disambiguated some other way.) To confuse the issue fur‐
1694 ther, we use the word with two overloaded definitions: to describe
1695 how you can define your own "subroutine" to hide a built-in "func‐
1696 tion" of the same name (see "Overriding Built-in Functions" in
1697 perlsub) and to describe how you can define a replacement "method"
1698 in a "derived class" to hide a "base class"'s method of the same
1699 name (see perlobj).
1700
1701 owner
1702 The one user (apart from the superuser) who has absolute control
1703 over a "file". A file may also have a "group" of users who may
1704 exercise joint ownership if the real owner permits it. See "per‐
1705 mission bits".
1706
1707 P
1708
1709 package
1710 A "namespace" for global variables, subroutines, and the like, such
1711 that they can be kept separate from like-named symbols in other
1712 namespaces. In a sense, only the package is global, since the sym‐
1713 bols in the package's symbol table are only accessible from code
1714 compiled outside the package by naming the package. But in another
1715 sense, all package symbols are also globals--they're just well-
1716 organized globals.
1717
1718 pad Short for "scratchpad".
1719
1720 parameter
1721 See "argument".
1722
1723 parent class
1724 See "base class".
1725
1726 parse tree
1727 See "syntax tree".
1728
1729 parsing
1730 The subtle but sometimes brutal art of attempting to turn your pos‐
1731 sibly malformed program into a valid "syntax tree".
1732
1733 patch
1734 To fix by applying one, as it were. In the realm of hackerdom, a
1735 listing of the differences between two versions of a program as
1736 might be applied by the patch(1) program when you want to fix a bug
1737 or upgrade your old version.
1738
1739 PATH
1740 The list of directories the system searches to find a program you
1741 want to "execute". The list is stored as one of your environment
1742 variables, accessible in Perl as $ENV{PATH}.
1743
1744 pathname
1745 A fully qualified filename such as /usr/bin/perl. Sometimes con‐
1746 fused with "PATH".
1747
1748 pattern
1749 A template used in "pattern matching".
1750
1751 pattern matching
1752 Taking a pattern, usually a "regular expression", and trying the
1753 pattern various ways on a string to see whether there's any way to
1754 make it fit. Often used to pick interesting tidbits out of a file.
1755
1756 permission bits
1757 Bits that the "owner" of a file sets or unsets to allow or disallow
1758 access to other people. These flag bits are part of the "mode"
1759 word returned by the stat built-in when you ask about a file. On
1760 Unix systems, you can check the ls(1) manpage for more information.
1761
1762 Pern
1763 What you get when you do "Perl++" twice. Doing it only once will
1764 curl your hair. You have to increment it eight times to shampoo
1765 your hair. Lather, rinse, iterate.
1766
1767 pipe
1768 A direct "connection" that carries the output of one "process" to
1769 the input of another without an intermediate temporary file. Once
1770 the pipe is set up, the two processes in question can read and
1771 write as if they were talking to a normal file, with some caveats.
1772
1773 pipeline
1774 A series of processes all in a row, linked by pipes, where each
1775 passes its output stream to the next.
1776
1777 platform
1778 The entire hardware and software context in which a program runs.
1779 A
1780 program written in a platform-dependent language might break if
1781 you change any of: machine, operating system, libraries, compiler,
1782 or system configuration. The perl interpreter has to be compiled
1783 differently for each platform because it is implemented in C, but
1784 programs written in the Perl language are largely platform-indepen‐
1785 dent.
1786
1787 pod The markup used to embed documentation into your Perl code. See
1788 perlpod.
1789
1790 pointer
1791 A "variable" in a language like C that contains the exact memory
1792 location of some other item. Perl handles pointers internally so
1793 you don't have to worry about them. Instead, you just use symbolic
1794 pointers in the form of keys and "variable" names, or hard refer‐
1795 ences, which aren't pointers (but act like pointers and do in fact
1796 contain pointers).
1797
1798 polymorphism
1799 The notion that you can tell an "object" to do something generic,
1800 and the object will interpret the command in different ways depend‐
1801 ing on its type. [<Gk many shapes]
1802
1803 port
1804 The part of the address of a TCP or UDP socket that directs packets
1805 to the correct process after finding the right machine, something
1806 like the phone extension you give when you reach the company opera‐
1807 tor. Also, the result of converting code to run on a different
1808 platform than originally intended, or the verb denoting this con‐
1809 version.
1810
1811 portable
1812 Once upon a time, C code compilable under both BSD and SysV. In
1813 general, code that can be easily converted to run on another "plat‐
1814 form", where "easily" can be defined however you like, and usually
1815 is. Anything may be considered portable if you try hard enough.
1816 See mobile home or London Bridge.
1817
1818 porter
1819 Someone who "carries" software from one "platform" to another.
1820 Porting programs written in platform-dependent languages such as C
1821 can be difficult work, but porting programs like Perl is very much
1822 worth the agony.
1823
1824 POSIX
1825 The Portable Operating System Interface specification.
1826
1827 postfix
1828 An "operator" that follows its "operand", as in "$x++".
1829
1830 pp An internal shorthand for a "push-pop" code, that is, C code imple‐
1831 menting Perl's stack machine.
1832
1833 pragma
1834 A standard module whose practical hints and suggestions are
1835 received (and possibly ignored) at compile time. Pragmas are named
1836 in all lowercase.
1837
1838 precedence
1839 The rules of conduct that, in the absence of other guidance, deter‐
1840 mine what should happen first. For example, in the absence of
1841 parentheses, you always do multiplication before addition.
1842
1843 prefix
1844 An "operator" that precedes its "operand", as in "++$x".
1845
1846 preprocessing
1847 What some helper "process" did to transform the incoming data into
1848 a form more suitable for the current process. Often done with an
1849 incoming "pipe". See also "C preprocessor".
1850
1851 procedure
1852 A "subroutine".
1853
1854 process
1855 An instance of a running program. Under multitasking systems like
1856 Unix, two or more separate processes could be running the same pro‐
1857 gram independently at the same time--in fact, the fork function is
1858 designed to bring about this happy state of affairs. Under other
1859 operating systems, processes are sometimes called "threads",
1860 "tasks", or "jobs", often with slight nuances in meaning.
1861
1862 program generator
1863 A system that algorithmically writes code for you in a high-level
1864 language. See also "code generator".
1865
1866 progressive matching
1867 Pattern matching that picks up where it left off before.
1868
1869 property
1870 See either "instance variable" or "character property".
1871
1872 protocol
1873 In networking, an agreed-upon way of sending messages back and
1874 forth so that neither correspondent will get too confused.
1875
1876 prototype
1877 An optional part of a "subroutine" declaration telling the Perl
1878 compiler how many and what flavor of arguments may be passed as
1879 "actual arguments", so that you can write subroutine calls that
1880 parse much like built-in functions. (Or don't parse, as the case
1881 may be.)
1882
1883 pseudofunction
1884 A construct that sometimes looks like a function but really isn't.
1885 Usually reserved for "lvalue" modifiers like my, for "context" mod‐
1886 ifiers like scalar, and for the pick-your-own-quotes constructs,
1887 "q//", "qq//", "qx//", "qw//", "qr//", "m//", "s///", "y///", and
1888 "tr///".
1889
1890 pseudohash
1891 A reference to an array whose initial element happens to hold a
1892 reference to a hash. You can treat a pseudohash reference as
1893 either an array reference or a hash reference.
1894
1895 pseudoliteral
1896 An "operator" that looks something like a "literal", such as the
1897 output-grabbing operator, "`""command""`".
1898
1899 public domain
1900 Something not owned by anybody. Perl is copyrighted and is thus
1901 not in the public domain--it's just "freely available" and "freely
1902 redistributable".
1903
1904 pumpkin
1905 A notional "baton" handed around the Perl community indicating who
1906 is the lead integrator in some arena of development.
1907
1908 pumpking
1909 A "pumpkin" holder, the person in charge of pumping the pump, or at
1910 least priming it. Must be willing to play the part of the Great
1911 Pumpkin now and then.
1912
1913 PV A "pointer value", which is Perl Internals Talk for a "char*".
1914
1915 Q
1916
1917 qualified
1918 Possessing a complete name. The symbol $Ent::moot is qualified;
1919 $moot is unqualified. A fully qualified filename is specified from
1920 the top-level directory.
1921
1922 quantifier
1923 A component of a "regular expression" specifying how many times the
1924 foregoing "atom" may occur.
1925
1926 R
1927
1928 readable
1929 With respect to files, one that has the proper permission bit set
1930 to let you access the file. With respect to computer programs, one
1931 that's written well enough that someone has a chance of figuring
1932 out what it's trying to do.
1933
1934 reaping
1935 The last rites performed by a parent "process" on behalf of a
1936 deceased child process so that it doesn't remain a "zombie". See
1937 the wait and waitpid function calls.
1938
1939 record
1940 A set of related data values in a "file" or "stream", often associ‐
1941 ated with a unique "key" field. In Unix, often commensurate with a
1942 "line", or a blank-line-terminated set of lines (a "paragraph").
1943 Each line of the /etc/passwd file is a record, keyed on login name,
1944 containing information about that user.
1945
1946 recursion
1947 The art of defining something (at least partly) in terms of itself,
1948 which is a naughty no-no in dictionaries but often works out okay
1949 in computer programs if you're careful not to recurse forever,
1950 which is like an infinite loop with more spectacular failure modes.
1951
1952 reference
1953 Where you look to find a pointer to information somewhere else.
1954 (See "indirection".) References come in two flavors, symbolic ref‐
1955 erences and hard references.
1956
1957 referent
1958 Whatever a reference refers to, which may or may not have a name.
1959 Common types of referents include scalars, arrays, hashes, and sub‐
1960 routines.
1961
1962 regex
1963 See "regular expression".
1964
1965 regular expression
1966 A single entity with various interpretations, like an elephant. To
1967 a computer scientist, it's a grammar for a little language in which
1968 some strings are legal and others aren't. To normal people, it's a
1969 pattern you can use to find what you're looking for when it varies
1970 from case to case. Perl's regular expressions are far from regular
1971 in the theoretical sense, but in regular use they work quite well.
1972 Here's a regular expression: "/Oh s.*t./". This will match strings
1973 like ""Oh say can you see by the dawn's early light"" and ""Oh
1974 sit!"". See perlre.
1975
1976 regular expression modifier
1977 An option on a pattern or substitution, such as "/i" to render the
1978 pattern case insensitive. See also "cloister".
1979
1980 regular file
1981 A "file" that's not a "directory", a "device", a named "pipe" or
1982 "socket", or a "symbolic link". Perl uses the "-f" file test oper‐
1983 ator to identify regular files. Sometimes called a "plain" file.
1984
1985 relational operator
1986 An "operator" that says whether a particular ordering relationship
1987 is "true" about a pair of operands. Perl has both numeric and
1988 string relational operators. See "collating sequence".
1989
1990 reserved words
1991 A word with a specific, built-in meaning to a "compiler", such as
1992 "if" or delete. In many languages (not Perl), it's illegal to use
1993 reserved words to name anything else. (Which is why they're
1994 reserved, after all.) In Perl, you just can't use them to name
1995 labels or filehandles. Also called "keywords".
1996
1997 return value
1998 The "value" produced by a "subroutine" or "expression" when evalu‐
1999 ated. In Perl, a return value may be either a "list" or a
2000 "scalar".
2001
2002 RFC Request For Comment, which despite the timid connotations is the
2003 name of a series of important standards documents.
2004
2005 right shift
2006 A "bit shift" that divides a number by some power of 2.
2007
2008 root
2009 The superuser (UID == 0). Also, the top-level directory of the
2010 filesystem.
2011
2012 RTFM
2013 What you are told when someone thinks you should Read The Fine Man‐
2014 ual.
2015
2016 run phase
2017 Any time after Perl starts running your main program. See also
2018 "compile phase". Run phase is mostly spent in "run time" but may
2019 also be spent in "compile time" when require, do "FILE", or eval
2020 "STRING" operators are executed or when a substitution uses the
2021 "/ee" modifier.
2022
2023 run time
2024 The time when Perl is actually doing what your code says to do, as
2025 opposed to the earlier period of time when it was trying to figure
2026 out whether what you said made any sense whatsoever, which is "com‐
2027 pile time".
2028
2029 run-time pattern
2030 A pattern that contains one or more variables to be interpolated
2031 before parsing the pattern as a "regular expression", and that
2032 therefore cannot be analyzed at compile time, but must be re-ana‐
2033 lyzed each time the pattern match operator is evaluated. Run-time
2034 patterns are useful but expensive.
2035
2036 RV A recreational vehicle, not to be confused with vehicular recre‐
2037 ation. RV also means an internal Reference Value of the type a
2038 "scalar" can hold. See also "IV" and "NV" if you're not confused
2039 yet.
2040
2041 rvalue
2042 A "value" that you might find on the right side of an "assignment".
2043 See also "lvalue".
2044
2045 S
2046
2047 scalar
2048 A simple, singular value; a number, "string", or "reference".
2049
2050 scalar context
2051 The situation in which an "expression" is expected by its surround‐
2052 ings (the code calling it) to return a single "value" rather than a
2053 "list" of values. See also "context" and "list context". A scalar
2054 context sometimes imposes additional constraints on the return
2055 value--see "string context" and "numeric context". Sometimes we
2056 talk about a "Boolean context" inside conditionals, but this
2057 imposes no additional constraints, since any scalar value, whether
2058 numeric or "string", is already true or false.
2059
2060 scalar literal
2061 A number or quoted "string"--an actual "value" in the text of your
2062 program, as opposed to a "variable".
2063
2064 scalar value
2065 A value that happens to be a "scalar" as opposed to a "list".
2066
2067 scalar variable
2068 A "variable" prefixed with "$" that holds a single value.
2069
2070 scope
2071 How far away you can see a variable from, looking through one.
2072 Perl has two visibility mechanisms: it does "dynamic scoping" of
2073 local variables, meaning that the rest of the "block", and any sub‐
2074 routines that are called by the rest of the block, can see the
2075 variables that are local to the block. Perl does "lexical scoping"
2076 of my variables, meaning that the rest of the block can see the
2077 variable, but other subroutines called by the block cannot see the
2078 variable.
2079
2080 scratchpad
2081 The area in which a particular invocation of a particular file or
2082 subroutine keeps some of its temporary values, including any lexi‐
2083 cally scoped variables.
2084
2085 script
2086 A text "file" that is a program intended to be executed directly
2087 rather than compiled to another form of file before execution.
2088 Also, in the context of "Unicode", a writing system for a particu‐
2089 lar language or group of languages, such as Greek, Bengali, or
2090 Klingon.
2091
2092 script kiddie
2093 A "cracker" who is not a "hacker", but knows just enough to run
2094 canned scripts. A cargo-cult programmer.
2095
2096 sed A venerable Stream EDitor from which Perl derives some of its
2097 ideas.
2098
2099 semaphore
2100 A fancy kind of interlock that prevents multiple threads or pro‐
2101 cesses from using up the same resources simultaneously.
2102
2103 separator
2104 A "character" or "string" that keeps two surrounding strings from
2105 being confused with each other. The split function works on sepa‐
2106 rators. Not to be confused with delimiters or terminators. The
2107 "or" in the previous sentence separated the two alternatives.
2108
2109 serialization
2110 Putting a fancy "data structure" into linear order so that it can
2111 be stored as a "string" in a disk file or database or sent through
2112 a "pipe". Also called marshalling.
2113
2114 server
2115 In networking, a "process" that either advertises a "service" or
2116 just hangs around at a known location and waits for clients who
2117 need service to get in touch with it.
2118
2119 service
2120 Something you do for someone else to make them happy, like giving
2121 them the time of day (or of their life). On some machines, well-
2122 known services are listed by the getservent function.
2123
2124 setgid
2125 Same as "setuid", only having to do with giving away "group" privi‐
2126 leges.
2127
2128 setuid
2129 Said of a program that runs with the privileges of its "owner"
2130 rather than (as is usually the case) the privileges of whoever is
2131 running it. Also describes the bit in the mode word ("permission
2132 bits") that controls the feature. This bit must be explicitly set
2133 by the owner to enable this feature, and the program must be care‐
2134 fully written not to give away more privileges than it ought to.
2135
2136 shared memory
2137 A piece of "memory" accessible by two different processes who oth‐
2138 erwise would not see each other's memory.
2139
2140 shebang
2141 Irish for the whole McGillicuddy. In Perl culture, a portmanteau
2142 of "sharp" and "bang", meaning the "#!" sequence that tells the
2143 system where to find the interpreter.
2144
2145 shell
2146 A "command"-line "interpreter". The program that interactively
2147 gives you a prompt, accepts one or more lines of input, and exe‐
2148 cutes the programs you mentioned, feeding each of them their proper
2149 arguments and input data. Shells can also execute scripts contain‐
2150 ing such commands. Under Unix, typical shells include the Bourne
2151 shell (/bin/sh), the C shell (/bin/csh), and the Korn shell
2152 (/bin/ksh). Perl is not strictly a shell because it's not interac‐
2153 tive (although Perl programs can be interactive).
2154
2155 side effects
2156 Something extra that happens when you evaluate an "expression".
2157 Nowadays it can refer to almost anything. For example, evaluating
2158 a simple assignment statement typically has the "side effect" of
2159 assigning a value to a variable. (And you thought assigning the
2160 value was your primary intent in the first place!) Likewise,
2161 assigning a value to the special variable $⎪ ($AUTOFLUSH) has the
2162 side effect of forcing a flush after every write or print on the
2163 currently selected filehandle.
2164
2165 signal
2166 A bolt out of the blue; that is, an event triggered by the "operat‐
2167 ing system", probably when you're least expecting it.
2168
2169 signal handler
2170 A "subroutine" that, instead of being content to be called in the
2171 normal fashion, sits around waiting for a bolt out of the blue
2172 before it will deign to "execute". Under Perl, bolts out of the
2173 blue are called signals, and you send them with the kill built-in.
2174 See "%SIG" in perlvar and "Signals" in perlipc.
2175
2176 single inheritance
2177 The features you got from your mother, if she told you that you
2178 don't have a father. (See also "inheritance" and "multiple inheri‐
2179 tance".) In computer languages, the notion that classes reproduce
2180 asexually so that a given class can only have one direct ancestor
2181 or "base class". Perl supplies no such restriction, though you may
2182 certainly program Perl that way if you like.
2183
2184 slice
2185 A selection of any number of elements from a "list", "array", or
2186 "hash".
2187
2188 slurp
2189 To read an entire "file" into a "string" in one operation.
2190
2191 socket
2192 An endpoint for network communication among multiple processes that
2193 works much like a telephone or a post office box. The most impor‐
2194 tant thing about a socket is its "network address" (like a phone
2195 number). Different kinds of sockets have different kinds of
2196 addresses--some look like filenames, and some don't.
2197
2198 soft reference
2199 See "symbolic reference".
2200
2201 source filter
2202 A special kind of "module" that does "preprocessing" on your script
2203 just before it gets to the "tokener".
2204
2205 stack
2206 A device you can put things on the top of, and later take them back
2207 off in the opposite order in which you put them on. See "LIFO".
2208
2209 standard
2210 Included in the official Perl distribution, as in a standard mod‐
2211 ule, a standard tool, or a standard Perl "manpage".
2212
2213 standard error
2214 The default output "stream" for nasty remarks that don't belong in
2215 "standard output". Represented within a Perl program by the "file‐
2216 handle" "STDERR". You can use this stream explicitly, but the die
2217 and warn built-ins write to your standard error stream automati‐
2218 cally.
2219
2220 standard I/O
2221 A standard C library for doing buffered input and output to the
2222 "operating system". (The "standard" of standard I/O is only
2223 marginally related to the "standard" of standard input and output.)
2224 In general, Perl relies on whatever implementation of standard I/O
2225 a given operating system supplies, so the buffering characteristics
2226 of a Perl program on one machine may not exactly match those on
2227 another machine. Normally this only influences efficiency, not
2228 semantics. If your standard I/O package is doing block buffering
2229 and you want it to "flush" the buffer more often, just set the $⎪
2230 variable to a true value.
2231
2232 standard input
2233 The default input "stream" for your program, which if possible
2234 shouldn't care where its data is coming from. Represented within a
2235 Perl program by the "filehandle" "STDIN".
2236
2237 standard output
2238 The default output "stream" for your program, which if possible
2239 shouldn't care where its data is going. Represented within a Perl
2240 program by the "filehandle" "STDOUT".
2241
2242 stat structure
2243 A special internal spot in which Perl keeps the information about
2244 the last "file" on which you requested information.
2245
2246 statement
2247 A "command" to the computer about what to do next, like a step in a
2248 recipe: "Add marmalade to batter and mix until mixed." A statement
2249 is distinguished from a "declaration", which doesn't tell the com‐
2250 puter to do anything, but just to learn something.
2251
2252 statement modifier
2253 A "conditional" or "loop" that you put after the "statement"
2254 instead of before, if you know what we mean.
2255
2256 static
2257 Varying slowly compared to something else. (Unfortunately, every‐
2258 thing is relatively stable compared to something else, except for
2259 certain elementary particles, and we're not so sure about them.)
2260 In computers, where things are supposed to vary rapidly, "static"
2261 has a derogatory connotation, indicating a slightly dysfunctional
2262 "variable", "subroutine", or "method". In Perl culture, the word
2263 is politely avoided.
2264
2265 static method
2266 No such thing. See "class method".
2267
2268 static scoping
2269 No such thing. See "lexical scoping".
2270
2271 static variable
2272 No such thing. Just use a "lexical variable" in a scope larger
2273 than your "subroutine".
2274
2275 status
2276 The "value" returned to the parent "process" when one of its child
2277 processes dies. This value is placed in the special variable $?.
2278 Its upper eight bits are the exit status of the defunct process,
2279 and its lower eight bits identify the signal (if any) that the
2280 process died from. On Unix systems, this status value is the same
2281 as the status word returned by wait(2). See "system" in perlfunc.
2282
2283 STDERR
2284 See "standard error".
2285
2286 STDIN
2287 See "standard input".
2288
2289 STDIO
2290 See "standard I/O".
2291
2292 STDOUT
2293 See "standard output".
2294
2295 stream
2296 A flow of data into or out of a process as a steady sequence of
2297 bytes or characters, without the appearance of being broken up into
2298 packets. This is a kind of "interface"--the underlying "implemen‐
2299 tation" may well break your data up into separate packets for
2300 delivery, but this is hidden from you.
2301
2302 string
2303 A sequence of characters such as "He said !@#*&%@#*?!". A string
2304 does not have to be entirely printable.
2305
2306 string context
2307 The situation in which an expression is expected by its surround‐
2308 ings (the code calling it) to return a "string". See also "con‐
2309 text" and "numeric context".
2310
2311 stringification
2312 The process of producing a "string" representation of an abstract
2313 object.
2314
2315 struct
2316 C keyword introducing a structure definition or name.
2317
2318 structure
2319 See "data structure".
2320
2321 subclass
2322 See "derived class".
2323
2324 subpattern
2325 A component of a "regular expression" pattern.
2326
2327 subroutine
2328 A named or otherwise accessible piece of program that can be
2329 invoked from elsewhere in the program in order to accomplish some
2330 sub-goal of the program. A subroutine is often parameterized to
2331 accomplish different but related things depending on its input
2332 arguments. If the subroutine returns a meaningful "value", it is
2333 also called a "function".
2334
2335 subscript
2336 A "value" that indicates the position of a particular "array" "ele‐
2337 ment" in an array.
2338
2339 substitution
2340 Changing parts of a string via the "s///" operator. (We avoid use
2341 of this term to mean "variable interpolation".)
2342
2343 substring
2344 A portion of a "string", starting at a certain "character" position
2345 ("offset") and proceeding for a certain number of characters.
2346
2347 superclass
2348 See "base class".
2349
2350 superuser
2351 The person whom the "operating system" will let do almost anything.
2352 Typically your system administrator or someone pretending to be
2353 your system administrator. On Unix systems, the "root" user. On
2354 Windows systems, usually the Administrator user.
2355
2356 SV Short for "scalar value". But within the Perl interpreter every
2357 "referent" is treated as a member of a class derived from SV, in an
2358 object-oriented sort of way. Every "value" inside Perl is passed
2359 around as a C language "SV*" pointer. The SV "struct" knows its
2360 own "referent type", and the code is smart enough (we hope) not to
2361 try to call a "hash" function on a "subroutine".
2362
2363 switch
2364 An option you give on a command line to influence the way your pro‐
2365 gram works, usually introduced with a minus sign. The word is also
2366 used as a nickname for a "switch statement".
2367
2368 switch cluster
2369 The combination of multiple command-line switches (e.g., -a -b -c)
2370 into one switch (e.g., -abc). Any switch with an additional "argu‐
2371 ment" must be the last switch in a cluster.
2372
2373 switch statement
2374 A program technique that lets you evaluate an "expression" and
2375 then, based on the value of the expression, do a multiway branch to
2376 the appropriate piece of code for that value. Also called a "case
2377 structure", named after the similar Pascal construct. Most switch
2378 statements in Perl are spelled "for". See "Basic BLOCKs and Switch
2379 Statements" in perlsyn.
2380
2381 symbol
2382 Generally, any "token" or "metasymbol". Often used more specifi‐
2383 cally to mean the sort of name you might find in a "symbol table".
2384
2385 symbol table
2386 Where a "compiler" remembers symbols. A program like Perl must
2387 somehow remember all the names of all the variables, filehandles,
2388 and subroutines you've used. It does this by placing the names in
2389 a symbol table, which is implemented in Perl using a "hash table".
2390 There is a separate symbol table for each "package" to give each
2391 package its own "namespace".
2392
2393 symbolic debugger
2394 A program that lets you step through the execution of your program,
2395 stopping or printing things out here and there to see whether any‐
2396 thing has gone wrong, and if so, what. The "symbolic" part just
2397 means that you can talk to the debugger using the same symbols with
2398 which your program is written.
2399
2400 symbolic link
2401 An alternate filename that points to the real "filename", which in
2402 turn points to the real "file". Whenever the "operating system" is
2403 trying to parse a "pathname" containing a symbolic link, it merely
2404 substitutes the new name and continues parsing.
2405
2406 symbolic reference
2407 A variable whose value is the name of another variable or subrou‐
2408 tine. By dereferencing the first variable, you can get at the sec‐
2409 ond one. Symbolic references are illegal under use strict 'refs'.
2410
2411 synchronous
2412 Programming in which the orderly sequence of events can be deter‐
2413 mined; that is, when things happen one after the other, not at the
2414 same time.
2415
2416 syntactic sugar
2417 An alternative way of writing something more easily; a shortcut.
2418
2419 syntax
2420 From Greek, "with-arrangement". How things (particularly symbols)
2421 are put together with each other.
2422
2423 syntax tree
2424 An internal representation of your program wherein lower-level con‐
2425 structs dangle off the higher-level constructs enclosing them.
2426
2427 syscall
2428 A "function" call directly to the "operating system". Many of the
2429 important subroutines and functions you use aren't direct system
2430 calls, but are built up in one or more layers above the system call
2431 level. In general, Perl programmers don't need to worry about the
2432 distinction. However, if you do happen to know which Perl func‐
2433 tions are really syscalls, you can predict which of these will set
2434 the $! ($ERRNO) variable on failure. Unfortunately, beginning
2435 programmers often confusingly employ the term "system call" to mean
2436 what happens when you call the Perl system function, which actually
2437 involves many syscalls. To avoid any confusion, we nearly always
2438 use say "syscall" for something you could call indirectly via
2439 Perl's syscall function, and never for something you would call
2440 with Perl's system function.
2441
2442 T
2443
2444 tainted
2445 Said of data derived from the grubby hands of a user and thus
2446 unsafe for a secure program to rely on. Perl does taint checks if
2447 you run a "setuid" (or "setgid") program, or if you use the -T
2448 switch.
2449
2450 TCP Short for Transmission Control Protocol. A protocol wrapped around
2451 the Internet Protocol to make an unreliable packet transmission
2452 mechanism appear to the application program to be a reliable
2453 "stream" of bytes. (Usually.)
2454
2455 term
2456 Short for a "terminal", that is, a leaf node of a "syntax tree". A
2457 thing that functions grammatically as an "operand" for the opera‐
2458 tors in an expression.
2459
2460 terminator
2461 A "character" or "string" that marks the end of another string.
2462 The $/ variable contains the string that terminates a readline
2463 operation, which chomp deletes from the end. Not to be confused
2464 with delimiters or separators. The period at the end of this sen‐
2465 tence is a terminator.
2466
2467 ternary
2468 An "operator" taking three operands. Sometimes pronounced "tri‐
2469 nary".
2470
2471 text
2472 A "string" or "file" containing primarily printable characters.
2473
2474 thread
2475 Like a forked process, but without "fork"'s inherent memory protec‐
2476 tion. A thread is lighter weight than a full process, in that a
2477 process could have multiple threads running around in it, all
2478 fighting over the same process's memory space unless steps are
2479 taken to protect threads from each other. See threads.
2480
2481 tie The bond between a magical variable and its implementation class.
2482 See "tie" in perlfunc and perltie.
2483
2484 TMTOWTDI
2485 There's More Than One Way To Do It, the Perl Motto. The notion
2486 that there can be more than one valid path to solving a programming
2487 problem in context. (This doesn't mean that more ways are always
2488 better or that all possible paths are equally desirable--just that
2489 there need not be One True Way.) Pronounced TimToady.
2490
2491 token
2492 A morpheme in a programming language, the smallest unit of text
2493 with semantic significance.
2494
2495 tokener
2496 A module that breaks a program text into a sequence of tokens for
2497 later analysis by a parser.
2498
2499 tokenizing
2500 Splitting up a program text into tokens. Also known as "lexing",
2501 in which case you get "lexemes" instead of tokens.
2502
2503 toolbox approach
2504 The notion that, with a complete set of simple tools that work well
2505 together, you can build almost anything you want. Which is fine if
2506 you're assembling a tricycle, but if you're building a defranishiz‐
2507 ing comboflux regurgalator, you really want your own machine shop
2508 in which to build special tools. Perl is sort of a machine shop.
2509
2510 transliterate
2511 To turn one string representation into another by mapping each
2512 character of the source string to its corresponding character in
2513 the result string. See "tr/SEARCHLIST/REPLACEMENTLIST/cds" in per‐
2514 lop.
2515
2516 trigger
2517 An event that causes a "handler" to be run.
2518
2519 trinary
2520 Not a stellar system with three stars, but an "operator" taking
2521 three operands. Sometimes pronounced "ternary".
2522
2523 troff
2524 A venerable typesetting language from which Perl derives the name
2525 of its $% variable and which is secretly used in the production of
2526 Camel books.
2527
2528 true
2529 Any scalar value that doesn't evaluate to 0 or "".
2530
2531 truncating
2532 Emptying a file of existing contents, either automatically when
2533 opening a file for writing or explicitly via the truncate function.
2534
2535 type
2536 See "data type" and "class".
2537
2538 type casting
2539 Converting data from one type to another. C permits this. Perl
2540 does not need it. Nor want it.
2541
2542 typed lexical
2543 A "lexical variable" that is declared with a "class" type: "my Pony
2544 $bill".
2545
2546 typedef
2547 A type definition in the C language.
2548
2549 typeglob
2550 Use of a single identifier, prefixed with "*". For example, *name
2551 stands for any or all of $name, @name, %name, &name, or just
2552 "name". How you use it determines whether it is interpreted as all
2553 or only one of them. See "Typeglobs and Filehandles" in perldata.
2554
2555 typemap
2556 A description of how C types may be transformed to and from Perl
2557 types within an "extension" module written in "XS".
2558
2559 U
2560
2561 UDP User Datagram Protocol, the typical way to send datagrams over the
2562 Internet.
2563
2564 UID A user ID. Often used in the context of "file" or "process" owner‐
2565 ship.
2566
2567 umask
2568 A mask of those "permission bits" that should be forced off when
2569 creating files or directories, in order to establish a policy of
2570 whom you'll ordinarily deny access to. See the umask function.
2571
2572 unary operator
2573 An operator with only one "operand", like "!" or chdir. Unary
2574 operators are usually prefix operators; that is, they precede their
2575 operand. The "++" and "--" operators can be either prefix or post‐
2576 fix. (Their position does change their meanings.)
2577
2578 Unicode
2579 A character set comprising all the major character sets of the
2580 world, more or less. See <http://www.unicode.org>.
2581
2582 Unix
2583 A very large and constantly evolving language with several alterna‐
2584 tive and largely incompatible syntaxes, in which anyone can define
2585 anything any way they choose, and usually do. Speakers of this
2586 language think it's easy to learn because it's so easily twisted to
2587 one's own ends, but dialectical differences make tribal intercommu‐
2588 nication nearly impossible, and travelers are often reduced to a
2589 pidgin-like subset of the language. To be universally understood,
2590 a Unix shell programmer must spend years of study in the art. Many
2591 have abandoned this discipline and now communicate via an
2592 Esperanto-like language called Perl.
2593
2594 In ancient times, Unix was also used to refer to some code that a
2595 couple of people at Bell Labs wrote to make use of a PDP-7 computer
2596 that wasn't doing much of anything else at the time.
2597
2598 V
2599
2600 value
2601 An actual piece of data, in contrast to all the variables, refer‐
2602 ences, keys, indexes, operators, and whatnot that you need to
2603 access the value.
2604
2605 variable
2606 A named storage location that can hold any of various kinds of
2607 "value", as your program sees fit.
2608
2609 variable interpolation
2610 The "interpolation" of a scalar or array variable into a string.
2611
2612 variadic
2613 Said of a "function" that happily receives an indeterminate number
2614 of "actual arguments".
2615
2616 vector
2617 Mathematical jargon for a list of scalar values.
2618
2619 virtual
2620 Providing the appearance of something without the reality, as in:
2621 virtual memory is not real memory. (See also "memory".) The oppo‐
2622 site of "virtual" is "transparent", which means providing the real‐
2623 ity of something without the appearance, as in: Perl handles the
2624 variable-length UTF-8 character encoding transparently.
2625
2626 void context
2627 A form of "scalar context" in which an "expression" is not expected
2628 to return any "value" at all and is evaluated for its "side
2629 effects" alone.
2630
2631 v-string
2632 A "version" or "vector" "string" specified with a "v" followed by a
2633 series of decimal integers in dot notation, for instance,
2634 "v1.20.300.4000". Each number turns into a "character" with the
2635 specified ordinal value. (The "v" is optional when there are at
2636 least three integers.)
2637
2638 W
2639
2640 warning
2641 A message printed to the "STDERR" stream to the effect that some‐
2642 thing might be wrong but isn't worth blowing up over. See "warn"
2643 in perlfunc and the warnings pragma.
2644
2645 watch expression
2646 An expression which, when its value changes, causes a breakpoint in
2647 the Perl debugger.
2648
2649 whitespace
2650 A "character" that moves your cursor but doesn't otherwise put any‐
2651 thing on your screen. Typically refers to any of: space, tab, line
2652 feed, carriage return, or form feed.
2653
2654 word
2655 In normal "computerese", the piece of data of the size most effi‐
2656 ciently handled by your computer, typically 32 bits or so, give or
2657 take a few powers of 2. In Perl culture, it more often refers to
2658 an alphanumeric "identifier" (including underscores), or to a
2659 string of nonwhitespace characters bounded by whitespace or string
2660 boundaries.
2661
2662 working directory
2663 Your current "directory", from which relative pathnames are inter‐
2664 preted by the "operating system". The operating system knows your
2665 current directory because you told it with a chdir or because you
2666 started out in the place where your parent "process" was when you
2667 were born.
2668
2669 wrapper
2670 A program or subroutine that runs some other program or subroutine
2671 for you, modifying some of its input or output to better suit your
2672 purposes.
2673
2674 WYSIWYG
2675 What You See Is What You Get. Usually used when something that
2676 appears on the screen matches how it will eventually look, like
2677 Perl's format declarations. Also used to mean the opposite of
2678 magic because everything works exactly as it appears, as in the
2679 three-argument form of open.
2680
2681 X
2682
2683 XS An extraordinarily exported, expeditiously excellent, expressly
2684 eXternal Subroutine, executed in existing C or C++ or in an excit‐
2685 ing new extension language called (exasperatingly) XS. Examine
2686 perlxs for the exact explanation or perlxstut for an exemplary
2687 unexacting one.
2688
2689 XSUB
2690 An external "subroutine" defined in "XS".
2691
2692 Y
2693
2694 yacc
2695 Yet Another Compiler Compiler. A parser generator without which
2696 Perl probably would not have existed. See the file perly.y in the
2697 Perl source distribution.
2698
2699 Z
2700
2701 zero width
2702 A subpattern "assertion" matching the "null string" between charac‐
2703 ters.
2704
2705 zombie
2706 A process that has died (exited) but whose parent has not yet
2707 received proper notification of its demise by virtue of having
2708 called wait or waitpid. If you fork, you must clean up after your
2709 child processes when they exit, or else the process table will fill
2710 up and your system administrator will Not Be Happy with you.
2711
2713 Based on the Glossary of Programming Perl, Third Edition, by Larry
2714 Wall, Tom Christiansen & Jon Orwant. Copyright (c) 2000, 1996, 1991
2715 O'Reilly Media, Inc. This document may be distributed under the same
2716 terms as Perl itself.
2717
2718
2719
2720perl v5.8.8 2006-01-07 PERLGLOSSARY(1)