- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

29.3 C

C
A language beloved by many for its inside-out type definitions, inscrutable precedence rules, and heavy overloading of the function-call mechanism. (Well, actually, people first switched to C because they found lowercase identifiers easier to read than upper.) Perl is written in C, so it's not surprising that Perl borrowed a few ideas from it.
C preprocessor
The typical C compiler's first pass, which processes lines beginning with # for conditional compilation and macro definition and does various manipulations of the program text based on the current definitions. Also known as cpp(1).
call by reference
An argument-passing mechanism in which the formal arguments refer directly to the actual arguments, and the subroutine can change the actual arguments by changing the formal arguments. That is, the formal argument is an alias for the actual argument. See also call by value.
call by value
An argument-passing mechanism in which the formal arguments refer to a copy of the actual arguments, and the subroutine cannot change the actual arguments by changing the formal arguments. See also call by reference.
callback
A handler that you register with some other part of your program in the hope that the other part of your program will trigger your handler when some event of interest transpires.
canonical
Reduced to a standard form to facilitate comparison.
capturing
The use of parentheses around a subpattern in a regular expression to store the matched substring as a backreference. (Captured strings are also returned as a list in list context.)
character
A small integer representative of a unit of orthography. Historically, characters were usually stored as fixed-width integers (typically in a byte, or maybe two, depending on the character set), but with the advent of UTF-8, characters are often stored in a variable number of bytes depending on the size of the integer that represents the character. Perl manages this transparently for you, for the most part.
character class
A square-bracketed list of characters used in a regular expression to indicate that any character of the set may occur at a given point. Loosely, any predefined set of characters so used.
character property
A predefined character class matchable by the \p metasymbol. Many standard properties are defined for Unicode.
circumfix operator
An operator that surrounds its operand, like the angle operator, or parentheses, or a hug.
class
A user-defined type, implemented in Perl via a package that provides (either directly or by inheritance) methods (that is, subroutines) to handle instances of the class (its objects). See also inheritance.
class method
A method whose invocant is a package name, not an object reference. A method associated with the class as a whole.
client
In networking, a process that initiates contact with a server process in order to exchange data and perhaps receive a service.
cloister
A cluster used to restrict the scope of a regular expression modifier.
closure
An anonymous subroutine that, when a reference to it is generated at run time, keeps track of the identities of externally visible lexical variables even after those lexical variables have supposedly gone out of scope. They're called "closures" because this sort of behavior gives mathematicians a sense of closure.
cluster
A parenthesized subpattern used to group parts of a regular expression into a single atom.
CODE
The word returned by the ref ( ) function when you apply it to a reference to a subroutine. See also CV.
code generator
A system that writes code for you in a low-level language, such as code to implement the backend of a compiler. See program generator.
code subpattern
A regular expression subpattern whose real purpose is to execute some Perl code, for example, the (?{...}) and (??{...}) subpatterns.
collating sequence
The order into which characters sort. This is used by string comparison routines to decide, for example, where in this glossary to put "collating sequence".
command
In shell programming, the syntactic combination of a program name and its arguments. More loosely, anything you type to a shell (a command interpreter) that starts it doing something. Even more loosely, a Perl statement, which might start with a label and typically ends with a semicolon.
command buffering
A mechanism in Perl that lets you store up the output of each Perl command and then flush it out as a single request to the operating system. It's enabled by setting the $| ($AUTOFLUSH) variable to a true value. It's used when you don't want data sitting around not going where it's supposed to, which may happen because the default on a file or pipe is to use block buffering.
command name
The name of the program currently executing, as typed on the command line. In C, the command name is passed to the program as the first command-line argument. In Perl, it comes in separately as $0.
command-line arguments
The values you supply along with a program name when you tell a shell to execute a command. These values are passed to a Perl program through @ARGV.
comment
A remark that doesn't affect the meaning of the program. In Perl, a comment is introduced by a # character and continues to the end of the line.
compilation unit
The file (or string, in the case of eval ( )) that is currently being compiled.
compile phase
Any time before Perl starts running your main program. See also run phase. Compile phase is mostly spent in compile time, but may also be spent in run time when BEGIN blocks, use ( ) declarations, or constant subexpressions are being evaluated. The startup and import code of any use ( ) declaration is also run during compile phase.
compile time
The time when Perl is trying to make sense of your code, as opposed to when it thinks it knows what your code means and is merely trying to do what it thinks your code says to do, which is run time.
compiler
Strictly speaking, a program that munches up another program and spits out yet another file containing the program in a "more executable" form, typically containing native machine instructions. The perl program is not a compiler by this definition, but it does contain a kind of compiler that takes a program and turns it into a more executable form (syntax trees) within the perl process itself, which the interpreter then interprets. There are, however, extension modules to get Perl to act more like a "real" compiler. See "Generic interface to Perl Compiler backends" (O) in the Perl C API and Internals Manual.
composer
A "constructor" for a referent that isn't really an object, like an anonymous array or a hash (or a sonata, for that matter). For example, a pair of braces acts as a composer for a hash, and a pair of brackets acts as a composer for an array. See 15.2.
concatenation
The process of gluing one cat's nose to another cat's tail. Also, a similar operation on two strings.
conditional
Something "iffy". See Boolean context.
connection
In telephony, the temporary electrical circuit between the caller's and the callee's phone. In networking, the same kind of temporary circuit between a client and a server.
construct
As a noun, a piece of syntax made up of smaller pieces. As a transitive verb, to create an object using a constructor.
constructor
Any class method, instance method, or subroutine that composes, initializes, blesses, and returns an object. Sometimes we use the term loosely to mean a composer.
context
The surroundings, or environment. The context given by the surrounding code determines what kind of data a particular expression is expected to return. The three primary contexts are list context, scalar context, and void context. Scalar context is sometimes subdivided into Boolean context, numeric context, string context, and void context. There's also a "don't care" scalar context (which is dealt with in Programming Perl, Third Edition, Chapter 2, "Bits and Pieces" if you care).
continuation
The treatment of more than one physical line as a single logical line. Makefile lines are continued by putting a backslash before the newline. Mail headers as defined by RFC 822 are continued by putting a space or tab after the newline. In general, lines in Perl do not need any form of continuation mark, because whitespace (including newlines) is gleefully ignored. Usually.
core dump
The corpse of a process, in the form of a file left in the working directory of the process, usually as a result of certain kinds of fatal error.
CPAN
The Comprehensive Perl Archive Network. (See "What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?" (perlfaq2) in the Perl FAQ).
cracker
Someone who breaks security on computer systems. A cracker may be a true hacker or only a script kiddie.
current package
The package in which the current statement is compiled. Scan backwards in the text of your program through the current lexical scope or any enclosing lexical scopes till you find a package declaration. That's your current package name.
current working directory
See working directory.
currently selected output channel
The last filehandle that was designated with select (FILEHANDLE); STDOUT, if no filehandle has been selected.
CV
An internal "code value" typedef, holding a subroutine. The CV type is a subclass of SV.
ISBN 9781906966027Perl Language Reference ManualSee the print edition