C[ Top ]
-c (character special) file test, 98
-c (check syntax) command-line switch, 493, 531, 660
-C (inode change time) file test, 100
-C (native wide characters) command-line switch, 404
\C (matching single byte in C language) wildcard metasymbol, 164, 406
/c modifier, 156
failed matches, searching past, 181
C language, 983
accessing Perl from enclosing framework, 476
C code generators, 478
C stack, storing C variables on, 474
C-style logical operators, 102
fcntl.h definitions, loading as Perl constants, 869
library functions, 678
library, signals triggering core dumps in, 413
operators missing in Perl, 110
operators, precedence relationships, 88
Perl, extending with, 530, 532-538
creating extensions, 534-537
external C library, using functions from, 538
XSUBs and XS language, 533
Perl functions, wrapping around, 533
Perl, running from
Perl stack, manipulating, 542
Perl, using from, 538-544
adding Perl interpreter, 539
compiling embedded Perl programs, 539
Perl statement, evaluating, 541
Perl subroutine, calling from, 540
XSUB input and output, 537
preprocessor, 983
programming, differences from Perl, 589
structs, 761
syslog functions, using in Perl, 869
wrapper programs, 570
C preprocessor, 499
caching, 267, 323, 381, 397, 422, 434, 550, 609
callbacks, 260, 983
caller function, 687
Perl versions, changes in return value, 592
calling
by reference, 219, 224, 983
subroutines indirectly, 218
by value, 220, 983
can method (in package UNIVERSAL), 326
canonical decomposition, characters, 170
canonicalization, 983
characters, information on, 406
capitalization, 54, 817
barewords, problems with, 64
changing, 157
escape sequences for, 61
label names, 115
lc and lcfirst functions, 736
method names, tied variables, 365
in module names, 866
module names, 300
package/module names, 605
subroutine names, 218
uppercase, converting to (\u escape), 152
capturing in patterns, 182-185, 983
suppressing in clustering, 185
words, alphanumeric, 151
^ (see caret, under Symbols)
Carp module, 367, 872, 878
carriage returns, 622
(see also newlines)
case
case-sensitive matching, switching off, 147, 157, 193
escape sequences for
processing during variable interpolation pass, 162
matching, /i operator, 147
translation operators, using Unicode tables, 407
case structure, 124
casting, strings and
cat command (Unix), 381
categories
of characters, 169
of functions, 680-681
cbreak option, 718
C/C++ languages, static variables
centering, 238
/cg pattern modifier, 150
CGI
Perl modules for, 550, 870
managing HTML forms with CGI.pm, 878
CGI scripts
input, evaluating (Safe module), 579
taint mode, necessity of running under, 559
CGI::Apache module, 870
CGI::Carp module, 870, 879
CGI::Cookie module, 870
CGI::Fast module, 870
CGI::Pretty module, 870
CGI::Push module, 870
character classes, 37, 165-176, 201, 983
confusing with array subscripts, 65
custom, 166
matching against character properties in Unicode, 407
metasymbols used within, 162
Perl classic, 174
Perl shortcuts for, 167
POSIX-style, 174-176
predefined, availability of, 407
Unicode properties, 167-174
wildcard metasymbols and, 164
character semantics
effects of, 405
character sets
ordering and ranges of characters in, 156
portability of, 628
Unicode, 401-410
characters, 47, 201, 983
(see also patterns and character classes)
$[ variable, 657
aliases for, 163
bytes vs., 402, 680
converting between fixed 8-bit and variable-length UTF-8, 403
decomposition of, 170
deleting, 689
in formats, 758
getting ASCII values of, 755
getting from ASCII values, 692
getting from Unicode values, 692
hexadecimal (see hexadecimal characters)
length in, 736
metacharacters, 140
metasymbols, 166
octal (see octal characters)
in patterns, 140-142
properties, 173
defining your own, 173
(see also Unicode)
prototype, 227
replacing in strings, 156
single-character input, 718
wildcard matches for, 164
special, 201
charnames pragma, 868
charts, generating, 234
chdir command
calling without argument, 503
chdir function, 688
precedence and, 89
CHECK blocks, 465, 531
order of running, 481
checking
taint, 559
checksums, 821
chemistry
Perl modules for, 551
$CHILD_ERROR, 659
child processes, 826
ID, returning, 715
starting readable, 427
starting writable, 426
(see also processes)
chmod function, 19, 688
chomp function, 22, 689
chop function, 22, 690
(see also chomp function)
chown function, 691
chr function, 408, 692
chroot function, 692
chroot syscall, 577
circular references, 266
breaking, 331
overloading, avoiding in, 356
circumfix operator, 983
class methods, 308, 983
constructors as, 318
package names as invocants for, 311
Thread class, 450
Class::Contract module, 341
Class::Multimethods module, 325
Class::Struct module, 866, 879
classes, 289, 308, 983
base (see base classes)
data, managing for, 343-346
storing references to class data in object itself, 345
definitions of
object-oriented modules as, 299
functions dealing with, 681
generating with Class::Struct module, 336
implementing tie, 364
implementing tied filehandles, 384
implementing tied hashes, 378
inheritance among, 321-330
base module, 871
method autoloading, 328
overridden methods, accessing, 324
private methods, avoiding with, 329
UNIVERSAL class and, 326-328
@ISA array, including with base pragma, 323
modules vs., 289
objects, giving to, 317
package, 90, 813, 821
packages as, 310
pseudohash implementations of, 744
quoting packages for, 316
scalar-tying, 366-370
version number, returning, 327
classes, Perl, 165
clearing hashes, 382
clients, networking, 983
getting name of, 442
clients, TCP, 439
cloisters, 186, 983
close function, 428, 693
closedir function, 694
close-on-exec flag, 675
closing server connections (half-close), 440
closing tied filehandles, 387
closures, 132, 259-263, 983
assigning to glob to define subroutine, 297
creating, 217
as function templates, 261
generating accessor methods with, 338
nested subroutines, emulating with, 262
private objects, using for, 339-342
threads, 450
clustering in patterns, 185, 983
without capturing, reasons for, 185
cmp operator, 28, 789
code
efficiency of, 600
extracting and displaying with debugger, 513
insecure, handling, 576-584
code masquerading as data, 581-584
safe compartments for, 577-581
safe examples, 579
mixing character semantics with byte semantics, 404
reusing, 607
code generation, 466, 874
code generators, 476-478, 984
bytecode generator, 477
C code generators, 478
code subpatterns in regular expressions, 210
coderef (see subroutine references)
collating sequence, 984
combining character sequence
\X, matching with, 407
combining character sequence, matching with \X, 165
comma (,) (see comma under Symbols)
command input operator (see backtick)
command interpreters, 486
quoting on Unix systems, 490
command line
calling Perl interpreter from, 18
Perl modules for editing, 550
modules for processing, 867
screen appearance of, 520
command processing, 486-502
location of Perl, 491
command-line flags and switches (see option processing)
commands
accessing under reduced privileges, 566-568
buffering, 670, 984
debugger, 509-518
actions and, 514
breakpoints, 511
documentation, viewing, 517
for display::display, 512
locating code, 513
options, manipulating, 517
quitting debugger, 516
restarting debugger, 516
stepping and running, 510
tracing, 512
hashes of functions, storing in, 282
history, debugger and, 507
for loop control, 120
names for, 16
in pod, 632
processing, 486
recalling, debugger option, 519
comments
definition, 49, 984
discarding before processing, 189
extending with /x pattern modifier, 148
multiline, 630
Perl vs. C syntax for, 589
comparing
files, 867
running time of alternate code versions, 874
strings, 100, 586
thread objects, 453
comparison operators, 27-28, 101
overloading, 354
sort function and, 789
compatibility decomposition, characters, 170
compilation, 530
order of, 484
compilation phase
processing Perl program, 531
compilation unit, 56, 984
compile phase vs. compile time, 467, 984
compiler, Perl, 660
backends for, 476
hints for, 664
modules related to, 549
compilers, 984
global declarations and, 127
regex compiler, 195
compilers, Perl
interpreters, interaction with, 480-485
modules related to, 874
compile-time
controlling debugger during, 509
compiling, 464-485
compiling your code, 467-473
embedded Perl program (in C), 539
life cycle of Perl programs, 465
life cycle, Perl programs
code generation phase, 466
compile phase, 465
parse tree reconstruction, 466
comp.lang.perl newsgroups, xxxi
complement (see negation)
complex data structures
creating in Perl, 268
representing as scalars, 13
composite Unicode properties, 168
Comprehensive Perl Archive Network (see CPAN)
COMSPEC environment variable, 504
concatenation (.) operator, 23, 95, 598, 984
autogeneration via stringification handler, 352
string constants, overloading, 360
condition variables, 459
conditional (?:) operator, 105, 125
conditional code execution, 27
conditional context (see Boolean context)
conditional statements, 114
without braces, writing, 113
(see also if statements; unless statements)
conditionals
interpolation into patterns, 214
conditions, expressions in loops, 116
%Config hash, 539, 622
Config module, 873
operating system mapping between signal names and numbers, 414
configuration
Perl, for debugging, 494
configuration files
Perl modules for, 550
connect function, 694
connection, shutting down, 787
constant pragma, 295
constants, 295
inlining constant functions, 228
overloading, 359
Perl, loading fcntl.h definitions as, 869
System V IPC, defining for, 869
constructors, 248, 308, 317-321, 985
access checks, setting in, 341
bless function and, 317
class names or objects, working with, 319
inheritable, 318
initializers, 319
naming, 320
new method, 745
tied variable classes, 364
container classes holding pointers to self-referential data structures, 331
context, 69-72, 985
Boolean context, 70
interpolative (double-quoted) context, 72
scalar and list context, 69
void, 71, 827
(see also list context; scalar context)
context stack, 474
continuation lines, 121, 663, 985
continue block, 115, 120-121
(see also loops)
continue command (in C), 589
contract between module and user, 302
contractions in words, avoiding confusion with single quotes, 203
control characters, 60
metasymbols in patterns, 163
non-ASCII on Macintosh, 491
control structures, 29-35
truth, defining, 29
control variables, 118
Control-A, 152
Control-C, 61
signals, handler for, 413
Control-C or Control-Z, generating signals with, 412
Control-D as end-of-file, 68, 618
Control-Z as end-of-file, 68, 618
conversion operators
Boolean context, interpreting object in, 351
numification (nonnumeric variable converted to number), 351
stringification, 351
converting
ASCII value to character, 692
between integers and UTF-8 characters, 408
between languages, 619
characters to ASCII values, 755
data types between C and Perl, 543
decimal numbers to binary, octal, or hexadecimal, 797
hexadecimal numbers to decimal, 730
list values to strings, 733, 757
numbers to/from hexadecimal, 153
octal numbers to decimal, 746
strings to list values, 794, 819
time, 728, 738
Unicode value to character, 692
cookies (HTTP), setting and getting, 870
copy constructor, 357
copying filenames or filehandles, 867
copy-on-write semantics, 447
core dumps, 985
denial-of-service problems with pattern matching, 583
dump function for, 703
signals triggering in C library, 413
Thread::Signal module, preventing with, 462
core files, 501
core modules, Perl, 549
CORE pseudopackage, 306, 324
CORE::GLOBAL pseudopackage, 306
cos (cosine) function, 694
counters
magical counter variables, 370
CPAN (Comprehensive Perl Archive Network), 15, 289, 299, 547-556
CPAN.pm module as automated interface to, 873, 881
installing modules with, 552
portability of, 627
modules
building, 552
categories of modules, 549
creating, 554-556
decompressing and unpacking, 552
installing and building, 551
installing into Perl library, 553
modules directory, 549-551
subdirectories, 547
tie modules on, 397-398
CPU
access in multitasking environment, 569
condition variables allowing threads to relinquish, 459
CPU time, 816
CPU, yielding (threads), 454
cracker, 985
creation time (see modification time, file )
credit cards
Perl modules for, 551
CRLF, 622
in Internet programs, 443
(see also newlines)
crypt function, 695
cryptography, 800
$ctime file statistic, 801
curly braces (see braces under Symbols)
current package, 985
Curses
Perl modules for, 550
customization
debugger, 518-521
debugger options, 519-521
editor support for, 518
functions for, 525
init files, using, 518
CV (internal code value), 985
Cwd module, 867
current working directory for process, determining, 881
D[ Top ]
-d (directory) file test operator, 28, 98
-d (debug) command-line switch, 493, 525
-D (debugging) command-line switch, 493
/d pattern modifier, 156-157
\d (digit) pattern metacharacter, 37
^D (Control-D) as end-of-file, 618
daemons
Perl modules for, 551
taint mode, importance of enabling for, 559
data
byte-oriented vs. character-oriented, 402
fixed-length, functions for, 680
insecure handling, 558-568
code masquerading as data, 581-584
command and file access under reduced privileges, 566-568
detecting and laundering tainted data, 561-564
environment, cleaning up, 565
screen dump, providing, 871
data access
threads, 454-463
condition variables, 459
deadlock, 457
locking methods, 459
locking subroutines, 457
synchronizing with lock, 455
unlocking, 456
DATA filehandle, 660
data organization in Perl, 275
data structures, 268-287, 549, 985
arrays of hashes, 277-279
complex, representing as scalars, 13
flat or linear in Perl, 242
hashes of arrays, 275-277
hashes of functions, 282
multidimensional hashes, 279-282
for objects, 317
objects (see objects)
persistent
providing via tie, 398
records of elaborate, 283-286
references to, 244
saving, 286
self-referential, container classes holding pointers to, 331
stringifying, 286
__DATA__ token, 68, 660
data types, 5, 985
built-in, 50-52
converting between C and Perl, 543
internal, Perl and C, 531
modules for, 866
scalars (see scalars)
TYPE declarations in Perl, 744
typeglobs, 78
Data::Dumper module, 286, 871, 882
databases
(see also DBI)
Perl connections to, 139
Perl modules for operating, 550
tying hash variables to, 363
datagrams, 438, 985
date function (see localtime function)
dates
Perl modules for, 549
dates, portability of, 627
DB_File module, 870
Data::Dumper module, using with, 882
DB module, 871
caller function, 688
DBD (Database drivers)
Perl modules for, 550
DBI (Database Interface)
Perl modules for, 550
DBM files, 985
complex data values, storing in, 882
dbmclose and dbmopen functions, 696
deleting from, 699
locking, 422
modules for, 870
portability of, 627
storing complex data values in, 397
dbmclose function, 363
dbmopen function, 363
use declarations with, 365
dbprofpp program, 526-528
deadlock in threads, 457
deallocating memory, 266
debugging, 493, 506-529, 559
backend modules for, 476
bug reports, xxxi
controlling from programs, 509
DB module, 871
debug level, setting through class or instances, 344
debugger code, command for loading, 504
debugger customization, 518-521
debugger support, Perl, 523
debugger, unattended execution, 521
Devel::Peek module for XS programs, 871
global destruction of objects other references, controlling, 505
overloading, 362
Perl debugger commands, 509-518
Perl, using C compiler -DDEBUGGING option, 322
turning on in tied filehandle, 391
Unix security bugs, 569
(see also taint)
$DEBUGGING, 660
debugging flags, 660
decimal points, lining up, 235
declarations, 3, 111-138, 986
field with use fields pragma, S
formats, 234
global, 127
global variables
lexically scoped, 133
methods
lvalues, indicating return of, 342
package, 14, 129, 290, 762
scoped, 129
structs, 336
subroutines, 127, 217, 804
without defining, 217
use declarations, 15
variables, 111, 130
declarative approach, regular expression programming, 206
decomposing characters into simpler ones, 170
decompressing CPAN modules, 552
decrementing variables, 26, 986
decryption (see encryption)
default package, 129
DEFAULT pseudosignal, 414
defined function, 697
defining, 986
subroutines, 219
definitions
classes
object-oriented modules as, 299
subroutines
loading from other files, 128
loading with AUTOLOAD, 297
subroutines, declarations vs., 127
DEL in hexadecimal, 61
delete function, 699
tied arrays, not returning deleted value for, 593
deleting
all debugger actions, 515
array elements, 764, 785, 793
breakpoints, 511
characters, 689
directories, 777, 819
files, 819
found but unreplaced characters, 156
hash elements, 699
delimiters, 986
pattern-matching operators and, 145
denial-of-service problems, security concerns with, 583
dereference operators, overloading, 356
dereference-address operator (x), C language, 110
dereferencing, 244, 251-253, 986
array elements, 271
hash values as functions, 283
operator for (see arrow operator)
typeglobs, 293
(see also references)
derived classes, 309, 986
methods as wrappers around base class methods, 324
descriptor (see file descriptor)
DESTROY method
sigtrap pragma and, 414
destroying threads
detach method, 453
join method, 451
destruction of objects and other references, controlling, 505
destructors, 330, 986
garbage collection with, 331
shared memory and semaphore, 437
detach method (in Thread module), 453
$dev file statistic, 801
Devel::DProf module, 525, 871
profiling subroutine execution with, 525-529
Devel::Peek module, 871
Devel::SelfStubber module, 873
Devel::SmallProf module, 529
development support, modules for, 549
diagnostic messages (see error messages; warning messages)
diagnostics pragma, 871
die function, 700
exit function versus, 711
quit signal handling and, 413
digits, 37
in names, 55
directives (pod), 632
directories, 986
changing working, 688
closing, 694
creating, 741
creating or removing portably, 867
current working, getting pathname of, 867
deleting, 777, 819
DirHandle module, 868
file test checks on trees, 867
functions dealing with, 681
handles, 755, 868, 986
IO::Dir module, 868
opendir function, 755
Perl modules for, 550
prepending to @INC, 497
reading entries from, 770
rewinddir function, 777
root, redefining, 692
seekdir function, 780
disciplines, 753
filehandles, setting up with binmode, 685
division (see multiplicative operators)
DNS (domain name service), 438
do, 90
BLOCK, 112, 701
&nbs