diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-11 20:37:23 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-11 20:37:23 +0000 |
commit | c2e66d9e68806a7000ee1a4760c35703a0e0ae89 (patch) | |
tree | 32508ca896b6e213afc07430f7aa223c0e9dde28 /pod/perltoc.pod | |
parent | 4755096ec61711c5104ba0b6b9314f32ca0351fe (diff) | |
download | perl-c2e66d9e68806a7000ee1a4760c35703a0e0ae89.tar.gz |
integrate cfgperl changes#6325..6373 into mainline
(NOTE: today's batch of integrations still untested)
p4raw-link: @6373 (not found)
p4raw-link: @6325 on //depot/cfgperl: d6ac44cc5a00fa38a56717785146bc16b716472c
p4raw-id: //depot/perl@6373
Diffstat (limited to 'pod/perltoc.pod')
-rw-r--r-- | pod/perltoc.pod | 1746 |
1 files changed, 894 insertions, 852 deletions
diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 2e23fc9116..accb11ccd9 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -488,6 +488,153 @@ regular expressions =back +=head2 perlsub - Perl subroutines + +=over + +=item SYNOPSIS + +=item DESCRIPTION + +=over + +=item Private Variables via my() + +=item Persistent Private Variables + +=item Temporary Values via local() + +=item Lvalue subroutines + +=item Passing Symbol Table Entries (typeglobs) + +=item When to Still Use local() + +1. You need to give a global variable a temporary value, especially $_, 2. +You need to create a local file or directory handle or a local function, 3. +You want to temporarily change just one element of an array or hash + +=item Pass by Reference + +=item Prototypes + +=item Constant Functions + +=item Overriding Built-in Functions + +=item Autoloading + +=item Subroutine Attributes + +=back + +=item SEE ALSO + +=back + +=head2 perlfunc - Perl builtin functions + +=over + +=item DESCRIPTION + +=over + +=item Perl Functions by Category + +Functions for SCALARs or strings, Regular expressions and pattern matching, +Numeric functions, Functions for real @ARRAYs, Functions for list data, +Functions for real %HASHes, Input and output functions, Functions for fixed +length data or records, Functions for filehandles, files, or directories, +Keywords related to the control flow of your perl program, Keywords related +to scoping, Miscellaneous functions, Functions for processes and process +groups, Keywords related to perl modules, Keywords related to classes and +object-orientedness, Low-level socket functions, System V interprocess +communication functions, Fetching user and group info, Fetching network +info, Time-related functions, Functions new in perl5, Functions obsoleted +in perl5 + +=item Portability + +=item Alphabetical Listing of Perl Functions + +I<-X> FILEHANDLE, I<-X> EXPR, I<-X>, abs VALUE, abs, accept +NEWSOCKET,GENERICSOCKET, alarm SECONDS, alarm, atan2 Y,X, bind SOCKET,NAME, +binmode FILEHANDLE, DISCIPLINE, binmode FILEHANDLE, bless REF,CLASSNAME, +bless REF, caller EXPR, caller, chdir EXPR, chmod LIST, chomp VARIABLE, +chomp LIST, chomp, chop VARIABLE, chop LIST, chop, chown LIST, chr NUMBER, +chr, chroot FILENAME, chroot, close FILEHANDLE, close, closedir DIRHANDLE, +connect SOCKET,NAME, continue BLOCK, cos EXPR, crypt PLAINTEXT,SALT, +dbmclose HASH, dbmopen HASH,DBNAME,MASK, defined EXPR, defined, delete +EXPR, die LIST, do BLOCK, do SUBROUTINE(LIST), do EXPR, dump LABEL, dump, +each HASH, eof FILEHANDLE, eof (), eof, eval EXPR, eval BLOCK, exec LIST, +exec PROGRAM LIST, exists EXPR, exit EXPR, exp EXPR, exp, fcntl +FILEHANDLE,FUNCTION,SCALAR, fileno FILEHANDLE, flock FILEHANDLE,OPERATION, +fork, format, formline PICTURE,LIST, getc FILEHANDLE, getc, getlogin, +getpeername SOCKET, getpgrp PID, getppid, getpriority WHICH,WHO, getpwnam +NAME, getgrnam NAME, gethostbyname NAME, getnetbyname NAME, getprotobyname +NAME, getpwuid UID, getgrgid GID, getservbyname NAME,PROTO, gethostbyaddr +ADDR,ADDRTYPE, getnetbyaddr ADDR,ADDRTYPE, getprotobynumber NUMBER, +getservbyport PORT,PROTO, getpwent, getgrent, gethostent, getnetent, +getprotoent, getservent, setpwent, setgrent, sethostent STAYOPEN, setnetent +STAYOPEN, setprotoent STAYOPEN, setservent STAYOPEN, endpwent, endgrent, +endhostent, endnetent, endprotoent, endservent, getsockname SOCKET, +getsockopt SOCKET,LEVEL,OPTNAME, glob EXPR, glob, gmtime EXPR, goto LABEL, +goto EXPR, goto &NAME, grep BLOCK LIST, grep EXPR,LIST, hex EXPR, hex, +import, index STR,SUBSTR,POSITION, index STR,SUBSTR, int EXPR, int, ioctl +FILEHANDLE,FUNCTION,SCALAR, join EXPR,LIST, keys HASH, kill SIGNAL, LIST, +last LABEL, last, lc EXPR, lc, lcfirst EXPR, lcfirst, length EXPR, length, +link OLDFILE,NEWFILE, listen SOCKET,QUEUESIZE, local EXPR, localtime EXPR, +lock, log EXPR, log, lstat FILEHANDLE, lstat EXPR, lstat, m//, map BLOCK +LIST, map EXPR,LIST, mkdir FILENAME,MASK, mkdir FILENAME, msgctl +ID,CMD,ARG, msgget KEY,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, msgsnd +ID,MSG,FLAGS, my EXPR, my EXPR : ATTRIBUTES, next LABEL, next, no Module +LIST, oct EXPR, oct, open FILEHANDLE,MODE,LIST, open FILEHANDLE,EXPR, open +FILEHANDLE, opendir DIRHANDLE,EXPR, ord EXPR, ord, our EXPR, pack +TEMPLATE,LIST, package, package NAMESPACE, pipe READHANDLE,WRITEHANDLE, pop +ARRAY, pop, pos SCALAR, pos, print FILEHANDLE LIST, print LIST, print, +printf FILEHANDLE FORMAT, LIST, printf FORMAT, LIST, prototype FUNCTION, +push ARRAY,LIST, q/STRING/, qq/STRING/, qr/STRING/, qx/STRING/, qw/STRING/, +quotemeta EXPR, quotemeta, rand EXPR, rand, read +FILEHANDLE,SCALAR,LENGTH,OFFSET, read FILEHANDLE,SCALAR,LENGTH, readdir +DIRHANDLE, readline EXPR, readlink EXPR, readlink, readpipe EXPR, recv +SOCKET,SCALAR,LENGTH,FLAGS, redo LABEL, redo, ref EXPR, ref, rename +OLDNAME,NEWNAME, require VERSION, require EXPR, require, reset EXPR, reset, +return EXPR, return, reverse LIST, rewinddir DIRHANDLE, rindex +STR,SUBSTR,POSITION, rindex STR,SUBSTR, rmdir FILENAME, rmdir, s///, scalar +EXPR, seek FILEHANDLE,POSITION,WHENCE, seekdir DIRHANDLE,POS, select +FILEHANDLE, select, select RBITS,WBITS,EBITS,TIMEOUT, semctl +ID,SEMNUM,CMD,ARG, semget KEY,NSEMS,FLAGS, semop KEY,OPSTRING, send +SOCKET,MSG,FLAGS,TO, send SOCKET,MSG,FLAGS, setpgrp PID,PGRP, setpriority +WHICH,WHO,PRIORITY, setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL, shift ARRAY, +shift, shmctl ID,CMD,ARG, shmget KEY,SIZE,FLAGS, shmread ID,VAR,POS,SIZE, +shmwrite ID,STRING,POS,SIZE, shutdown SOCKET,HOW, sin EXPR, sin, sleep +EXPR, sleep, socket SOCKET,DOMAIN,TYPE,PROTOCOL, socketpair +SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL, sort SUBNAME LIST, sort BLOCK LIST, +sort LIST, splice ARRAY,OFFSET,LENGTH,LIST, splice ARRAY,OFFSET,LENGTH, +splice ARRAY,OFFSET, splice ARRAY, split /PATTERN/,EXPR,LIMIT, split +/PATTERN/,EXPR, split /PATTERN/, split, sprintf FORMAT, LIST, sqrt EXPR, +sqrt, srand EXPR, srand, stat FILEHANDLE, stat EXPR, stat, study SCALAR, +study, sub BLOCK, sub NAME, sub NAME BLOCK, substr +EXPR,OFFSET,LENGTH,REPLACEMENT, substr EXPR,OFFSET,LENGTH, substr +EXPR,OFFSET, symlink OLDFILE,NEWFILE, syscall LIST, sysopen +FILEHANDLE,FILENAME,MODE, sysopen FILEHANDLE,FILENAME,MODE,PERMS, sysread +FILEHANDLE,SCALAR,LENGTH,OFFSET, sysread FILEHANDLE,SCALAR,LENGTH, sysseek +FILEHANDLE,POSITION,WHENCE, system LIST, system PROGRAM LIST, syswrite +FILEHANDLE,SCALAR,LENGTH,OFFSET, syswrite FILEHANDLE,SCALAR,LENGTH, +syswrite FILEHANDLE,SCALAR, tell FILEHANDLE, tell, telldir DIRHANDLE, tie +VARIABLE,CLASSNAME,LIST, tied VARIABLE, time, times, tr///, truncate +FILEHANDLE,LENGTH, truncate EXPR,LENGTH, uc EXPR, uc, ucfirst EXPR, +ucfirst, umask EXPR, umask, undef EXPR, undef, unlink LIST, unlink, unpack +TEMPLATE,EXPR, untie VARIABLE, unshift ARRAY,LIST, use Module VERSION LIST, +use Module VERSION, use Module LIST, use Module, use VERSION, utime LIST, +values HASH, vec EXPR,OFFSET,BITS, wait, waitpid PID,FLAGS, wantarray, warn +LIST, write FILEHANDLE, write EXPR, write, y/// + +=back + +=back + =head2 perlreftut - Mark's very short tutorial about references =over @@ -617,26 +764,6 @@ more elaborate constructs =back -=head2 perllol - Manipulating Arrays of Arrays in Perl - -=over - -=item DESCRIPTION - -=item Declaration and Access of Arrays of Arrays - -=item Growing Your Own - -=item Access and Printing - -=item Slices - -=item SEE ALSO - -=item AUTHOR - -=back - =head2 perlrequick - Perl regular expressions quick start =over @@ -694,144 +821,169 @@ times =back -=head2 perlretut - Perl regular expressions tutorial +=head2 perlpod - plain old documentation =over =item DESCRIPTION -=item Part 1: The basics - =over -=item Simple word matching +=item Verbatim Paragraph -=item Using character classes +=item Command Paragraph -\d is a digit and represents [0-9], \s is a whitespace character and -represents [\ \t\r\n\f], \w is a word character (alphanumeric or _) and -represents [0-9a-zA-Z_], \D is a negated \d; it represents any character -but a digit [^0-9], \S is a negated \s; it represents any non-whitespace -character [^\s], \W is a negated \w; it represents any non-word character -[^\w], The period '.' matches any character but "\n", no modifiers (//): -Default behavior. C<'.'> matches any character except C<"\n">. C<^> -matches only at the beginning of the string and C<$> matches only at the -end or before a newline at the end, s modifier (//s): Treat string as a -single long line. C<'.'> matches any character, even C<"\n">. C<^> -matches only at the beginning of the string and C<$> matches only at the -end or before a newline at the end, m modifier (//m): Treat string as a set -of multiple lines. C<'.'> matches any character except C<"\n">. C<^> and -C<$> are able to match at the start or end of I<any> line within the -string, both s and m modifiers (//sm): Treat string as a single long line, -but detect multiple lines. C<'.'> matches any character, even C<"\n">. -C<^> and C<$>, however, are able to match at the start or end of I<any> -line within the string +=item Ordinary Block of Text -=item Matching this or that +=item The Intent -=item Grouping things and hierarchical matching +=item Embedding Pods in Perl Modules -0 Start with the first letter in the string 'a', 1 Try the first -alternative in the first group 'abd', 2 Match 'a' followed by 'b'. So far -so good, 3 'd' in the regexp doesn't match 'c' in the string - a dead end. -So backtrack two characters and pick the second alternative in the first -group 'abc', 4 Match 'a' followed by 'b' followed by 'c'. We are on a roll -and have satisfied the first group. Set $1 to 'abc', 5 Move on to the -second group and pick the first alternative 'df', 6 Match the 'd', 7 'f' in -the regexp doesn't match 'e' in the string, so a dead end. Backtrack one -character and pick the second alternative in the second group 'd', 8 'd' -matches. The second grouping is satisfied, so set $2 to 'd', 9 We are at -the end of the regexp, so we are done! We have matched 'abcd' out of the -string "abcde" +=item Common Pod Pitfalls -=item Extracting matches +=back -=item Matching repetitions +=item SEE ALSO -C<a?> = match 'a' 1 or 0 times, C<a*> = match 'a' 0 or more times, i.e., -any number of times, C<a+> = match 'a' 1 or more times, i.e., at least -once, C<a{n,m}> = match at least C<n> times, but not more than C<m> times, -C<a{n,}> = match at least C<n> or more times, C<a{n}> = match exactly C<n> -times, Principle 0: Taken as a whole, any regexp will be matched at the -earliest possible position in the string, Principle 1: In an alternation -C<a|b|c...>, the leftmost alternative that allows a match for the whole -regexp will be the one used, Principle 2: The maximal matching quantifiers -C<?>, C<*>, C<+> and C<{n,m}> will in general match as much of the string -as possible while still allowing the whole regexp to match, Principle 3: If -there are two or more elements in a regexp, the leftmost greedy quantifier, -if any, will match as much of the string as possible while still allowing -the whole regexp to match. The next leftmost greedy quantifier, if any, -will try to match as much of the string remaining available to it as -possible, while still allowing the whole regexp to match. And so on, until -all the regexp elements are satisfied, C<a??> = match 'a' 0 or 1 times. Try -0 first, then 1, C<a*?> = match 'a' 0 or more times, i.e., any number of -times, but as few times as possible, C<a+?> = match 'a' 1 or more times, -i.e., at least once, but as few times as possible, C<a{n,m}?> = match at -least C<n> times, not more than C<m> times, as few times as possible, -C<a{n,}?> = match at least C<n> times, but as few times as possible, -C<a{n}?> = match exactly C<n> times. Because we match exactly C<n> times, -C<a{n}?> is equivalent to C<a{n}> and is just there for notational -consistency, Principle 3: If there are two or more elements in a regexp, -the leftmost greedy (non-greedy) quantifier, if any, will match as much -(little) of the string as possible while still allowing the whole regexp to -match. The next leftmost greedy (non-greedy) quantifier, if any, will try -to match as much (little) of the string remaining available to it as -possible, while still allowing the whole regexp to match. And so on, until -all the regexp elements are satisfied, 0 Start with the first letter in the -string 't', 1 The first quantifier '.*' starts out by matching the whole -string 'the cat in the hat', 2 'a' in the regexp element 'at' doesn't match -the end of the string. Backtrack one character, 3 'a' in the regexp -element 'at' still doesn't match the last letter of the string 't', so -backtrack one more character, 4 Now we can match the 'a' and the 't', 5 -Move on to the third element '.*'. Since we are at the end of the string -and '.*' can match 0 times, assign it the empty string, 6 We are done! +=item AUTHOR -=item Building a regexp +=back -specifying the task in detail,, breaking down the problem into smaller -parts,, translating the small parts into regexps,, combining the regexps,, -and optimizing the final combined regexp +=head2 perlstyle - Perl style guide -=item Using regular expressions in Perl +=over + +=item DESCRIPTION =back -=item Part 2: Power tools +=head2 perltrap - Perl traps for the unwary =over -=item More on characters, strings, and character classes +=item DESCRIPTION -=item Compiling and saving regular expressions +=over -=item Embedding comments and modifiers in a regular expression +=item Awk Traps -=item Non-capturing groupings +=item C Traps -=item Looking ahead and looking behind +=item Sed Traps -=item Using independent subexpressions to prevent backtracking +=item Shell Traps -=item Conditional expressions +=item Perl Traps -=item A bit of magic: executing Perl code in a regular expression +=item Perl4 to Perl5 Traps -=item Pragmas and debugging +Discontinuance, Deprecation, and BugFix traps, Parsing Traps, Numerical +Traps, General data type traps, Context Traps - scalar, list contexts, +Precedence Traps, General Regular Expression Traps using s///, etc, +Subroutine, Signal, Sorting Traps, OS Traps, DBM Traps, Unclassified Traps + +=item Discontinuance, Deprecation, and BugFix traps + +Discontinuance, Deprecation, BugFix, Discontinuance, Discontinuance, +Discontinuance, BugFix, Discontinuance, Discontinuance, BugFix, +Discontinuance, Deprecation, Discontinuance, Discontinuance + +=item Parsing Traps + +Parsing, Parsing, Parsing, Parsing + +=item Numerical Traps + +Numerical, Numerical, Numerical, Bitwise string ops + +=item General data type traps + +(Arrays), (Arrays), (Hashes), (Globs), (Globs), (Scalar String), +(Constants), (Scalars), (Variable Suicide) + +=item Context Traps - scalar, list contexts + +(list context), (scalar context), (scalar context), (list, builtin) + +=item Precedence Traps + +Precedence, Precedence, Precedence, Precedence, Precedence, Precedence, +Precedence + +=item General Regular Expression Traps using s///, etc. + +Regular Expression, Regular Expression, Regular Expression, Regular +Expression, Regular Expression, Regular Expression, Regular Expression, +Regular Expression + +=item Subroutine, Signal, Sorting Traps + +(Signals), (Sort Subroutine), warn() won't let you specify a filehandle + +=item OS Traps + +(SysV), (SysV) + +=item Interpolation Traps + +Interpolation, Interpolation, Interpolation, Interpolation, Interpolation, +Interpolation, Interpolation, Interpolation, Interpolation + +=item DBM Traps + +DBM, DBM + +=item Unclassified Traps + +C<require>/C<do> trap using returned value, C<split> on empty string with +LIMIT specified =back -=item BUGS +=back -=item SEE ALSO +=head2 perlrun - how to execute the Perl interpreter -=item AUTHOR AND COPYRIGHT +=over + +=item SYNOPSIS + +=item DESCRIPTION =over -=item Acknowledgments +=item #! and quoting on non-Unix systems + +OS/2, MS-DOS, Win95/NT, Macintosh, VMS + +=item Location of Perl + +=item Command Switches + +B<-0>[I<digits>], B<-a>, B<-C>, B<-c>, B<-d>, B<-d:>I<foo>, +B<-D>I<letters>, B<-D>I<number>, B<-e> I<commandline>, B<-F>I<pattern>, +B<-h>, B<-i>[I<extension>], B<-I>I<directory>, B<-l>[I<octnum>], +B<-m>[B<->]I<module>, B<-M>[B<->]I<module>, B<-M>[B<->]I<'module ...'>, +B<-[mM]>[B<->]I<module=arg[,arg]...>, B<-n>, B<-p>, B<-P>, B<-s>, B<-S>, +B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I<name>, B<-w>, B<-W>, B<-X>, +B<-x> I<directory> + +=back + +=item ENVIRONMENT + +HOME, LOGDIR, PATH, PERL5LIB, PERL5OPT, PERLLIB, PERL5DB, PERL5SHELL +(specific to the Win32 port), PERL_DEBUG_MSTATS, PERL_DESTRUCT_LEVEL, +PERL_ROOT (specific to the VMS port), SYS$LOGIN (specific to the VMS port) =back +=head2 perldiag - various Perl diagnostics + +=over + +=item DESCRIPTION + =back =head2 perllexwarn - Perl Lexical Warnings @@ -926,142 +1078,73 @@ listing =back -=head2 perlrun - how to execute the Perl interpreter +=head2 perlvar - Perl predefined variables =over -=item SYNOPSIS - =item DESCRIPTION =over -=item #! and quoting on non-Unix systems - -OS/2, MS-DOS, Win95/NT, Macintosh, VMS +=item Predefined Names -=item Location of Perl +$ARG, $_, $<I<digits>>, $MATCH, $&, $PREMATCH, $`, $POSTMATCH, $', +$LAST_PAREN_MATCH, $+, @LAST_MATCH_END, @+, $MULTILINE_MATCHING, $*, +input_line_number HANDLE EXPR, $INPUT_LINE_NUMBER, $NR, $, +input_record_separator HANDLE EXPR, $INPUT_RECORD_SEPARATOR, $RS, $/, +autoflush HANDLE EXPR, $OUTPUT_AUTOFLUSH, $|, output_field_separator HANDLE +EXPR, $OUTPUT_FIELD_SEPARATOR, $OFS, $,, output_record_separator HANDLE +EXPR, $OUTPUT_RECORD_SEPARATOR, $ORS, $\, $LIST_SEPARATOR, $", +$SUBSCRIPT_SEPARATOR, $SUBSEP, $;, $OFMT, $#, format_page_number HANDLE +EXPR, $FORMAT_PAGE_NUMBER, $%, format_lines_per_page HANDLE EXPR, +$FORMAT_LINES_PER_PAGE, $=, format_lines_left HANDLE EXPR, +$FORMAT_LINES_LEFT, $-, @LAST_MATCH_START, @-, C<$`> is the same as +C<substr($var, 0, $-[0])>, C<$&> is the same as C<substr($var, $-[0], $+[0] +- $-[0])>, C<$'> is the same as C<substr($var, $+[0])>, C<$1> is the same +as C<substr($var, $-[1], $+[1] - $-[1])>, C<$2> is the same as +C<substr($var, $-[2], $+[2] - $-[2])>, C<$3> is the same as C<substr $var, +$-[3], $+[3] - $-[3])>, format_name HANDLE EXPR, $FORMAT_NAME, $~, +format_top_name HANDLE EXPR, $FORMAT_TOP_NAME, $^, +format_line_break_characters HANDLE EXPR, $FORMAT_LINE_BREAK_CHARACTERS, +$:, format_formfeed HANDLE EXPR, $FORMAT_FORMFEED, $^L, $ACCUMULATOR, $^A, +$CHILD_ERROR, $?, $OS_ERROR, $ERRNO, $!, $EXTENDED_OS_ERROR, $^E, +$EVAL_ERROR, $@, $PROCESS_ID, $PID, $$, $REAL_USER_ID, $UID, $<, +$EFFECTIVE_USER_ID, $EUID, $>, $REAL_GROUP_ID, $GID, $(, +$EFFECTIVE_GROUP_ID, $EGID, $), $PROGRAM_NAME, $0, $[, $], $COMPILING, $^C, +$DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, %^H, $INPLACE_EDIT, $^I, $^M, +$OSNAME, $^O, $PERLDB, $^P, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, +0x100, 0x200, $LAST_REGEXP_CODE_RESULT, $^R, $EXCEPTIONS_BEING_CAUGHT, $^S, +$BASETIME, $^T, $PERL_VERSION, $^V, $WARNING, $^W, ${^WARNING_BITS}, +${^WIDE_SYSTEM_CALLS}, $EXECUTABLE_NAME, $^X, $ARGV, @ARGV, @INC, @_, %INC, +%ENV, $ENV{expr}, %SIG, $SIG{expr} -=item Command Switches +=item Error Indicators -B<-0>[I<digits>], B<-a>, B<-C>, B<-c>, B<-d>, B<-d:>I<foo>, -B<-D>I<letters>, B<-D>I<number>, B<-e> I<commandline>, B<-F>I<pattern>, -B<-h>, B<-i>[I<extension>], B<-I>I<directory>, B<-l>[I<octnum>], -B<-m>[B<->]I<module>, B<-M>[B<->]I<module>, B<-M>[B<->]I<'module ...'>, -B<-[mM]>[B<->]I<module=arg[,arg]...>, B<-n>, B<-p>, B<-P>, B<-s>, B<-S>, -B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I<name>, B<-w>, B<-W>, B<-X>, -B<-x> I<directory> +=item Technical Note on the Syntax of Variable Names =back -=item ENVIRONMENT - -HOME, LOGDIR, PATH, PERL5LIB, PERL5OPT, PERLLIB, PERL5DB, PERL5SHELL -(specific to the Win32 port), PERL_DEBUG_MSTATS, PERL_DESTRUCT_LEVEL, -PERL_ROOT (specific to the VMS port), SYS$LOGIN (specific to the VMS port) +=item BUGS =back -=head2 perlfunc - Perl builtin functions +=head2 perllol - Manipulating Arrays of Arrays in Perl =over =item DESCRIPTION -=over - -=item Perl Functions by Category +=item Declaration and Access of Arrays of Arrays -Functions for SCALARs or strings, Regular expressions and pattern matching, -Numeric functions, Functions for real @ARRAYs, Functions for list data, -Functions for real %HASHes, Input and output functions, Functions for fixed -length data or records, Functions for filehandles, files, or directories, -Keywords related to the control flow of your perl program, Keywords related -to scoping, Miscellaneous functions, Functions for processes and process -groups, Keywords related to perl modules, Keywords related to classes and -object-orientedness, Low-level socket functions, System V interprocess -communication functions, Fetching user and group info, Fetching network -info, Time-related functions, Functions new in perl5, Functions obsoleted -in perl5 +=item Growing Your Own -=item Portability +=item Access and Printing -=item Alphabetical Listing of Perl Functions +=item Slices -I<-X> FILEHANDLE, I<-X> EXPR, I<-X>, abs VALUE, abs, accept -NEWSOCKET,GENERICSOCKET, alarm SECONDS, alarm, atan2 Y,X, bind SOCKET,NAME, -binmode FILEHANDLE, DISCIPLINE, binmode FILEHANDLE, bless REF,CLASSNAME, -bless REF, caller EXPR, caller, chdir EXPR, chmod LIST, chomp VARIABLE, -chomp LIST, chomp, chop VARIABLE, chop LIST, chop, chown LIST, chr NUMBER, -chr, chroot FILENAME, chroot, close FILEHANDLE, close, closedir DIRHANDLE, -connect SOCKET,NAME, continue BLOCK, cos EXPR, crypt PLAINTEXT,SALT, -dbmclose HASH, dbmopen HASH,DBNAME,MASK, defined EXPR, defined, delete -EXPR, die LIST, do BLOCK, do SUBROUTINE(LIST), do EXPR, dump LABEL, dump, -each HASH, eof FILEHANDLE, eof (), eof, eval EXPR, eval BLOCK, exec LIST, -exec PROGRAM LIST, exists EXPR, exit EXPR, exp EXPR, exp, fcntl -FILEHANDLE,FUNCTION,SCALAR, fileno FILEHANDLE, flock FILEHANDLE,OPERATION, -fork, format, formline PICTURE,LIST, getc FILEHANDLE, getc, getlogin, -getpeername SOCKET, getpgrp PID, getppid, getpriority WHICH,WHO, getpwnam -NAME, getgrnam NAME, gethostbyname NAME, getnetbyname NAME, getprotobyname -NAME, getpwuid UID, getgrgid GID, getservbyname NAME,PROTO, gethostbyaddr -ADDR,ADDRTYPE, getnetbyaddr ADDR,ADDRTYPE, getprotobynumber NUMBER, -getservbyport PORT,PROTO, getpwent, getgrent, gethostent, getnetent, -getprotoent, getservent, setpwent, setgrent, sethostent STAYOPEN, setnetent -STAYOPEN, setprotoent STAYOPEN, setservent STAYOPEN, endpwent, endgrent, -endhostent, endnetent, endprotoent, endservent, getsockname SOCKET, -getsockopt SOCKET,LEVEL,OPTNAME, glob EXPR, glob, gmtime EXPR, goto LABEL, -goto EXPR, goto &NAME, grep BLOCK LIST, grep EXPR,LIST, hex EXPR, hex, -import, index STR,SUBSTR,POSITION, index STR,SUBSTR, int EXPR, int, ioctl -FILEHANDLE,FUNCTION,SCALAR, join EXPR,LIST, keys HASH, kill SIGNAL, LIST, -last LABEL, last, lc EXPR, lc, lcfirst EXPR, lcfirst, length EXPR, length, -link OLDFILE,NEWFILE, listen SOCKET,QUEUESIZE, local EXPR, localtime EXPR, -lock, log EXPR, log, lstat FILEHANDLE, lstat EXPR, lstat, m//, map BLOCK -LIST, map EXPR,LIST, mkdir FILENAME,MASK, mkdir FILENAME, msgctl -ID,CMD,ARG, msgget KEY,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, msgsnd -ID,MSG,FLAGS, my EXPR, my EXPR : ATTRIBUTES, next LABEL, next, no Module -LIST, oct EXPR, oct, open FILEHANDLE,MODE,LIST, open FILEHANDLE,EXPR, open -FILEHANDLE, opendir DIRHANDLE,EXPR, ord EXPR, ord, our EXPR, pack -TEMPLATE,LIST, package, package NAMESPACE, pipe READHANDLE,WRITEHANDLE, pop -ARRAY, pop, pos SCALAR, pos, print FILEHANDLE LIST, print LIST, print, -printf FILEHANDLE FORMAT, LIST, printf FORMAT, LIST, prototype FUNCTION, -push ARRAY,LIST, q/STRING/, qq/STRING/, qr/STRING/, qx/STRING/, qw/STRING/, -quotemeta EXPR, quotemeta, rand EXPR, rand, read -FILEHANDLE,SCALAR,LENGTH,OFFSET, read FILEHANDLE,SCALAR,LENGTH, readdir -DIRHANDLE, readline EXPR, readlink EXPR, readlink, readpipe EXPR, recv -SOCKET,SCALAR,LENGTH,FLAGS, redo LABEL, redo, ref EXPR, ref, rename -OLDNAME,NEWNAME, require VERSION, require EXPR, require, reset EXPR, reset, -return EXPR, return, reverse LIST, rewinddir DIRHANDLE, rindex -STR,SUBSTR,POSITION, rindex STR,SUBSTR, rmdir FILENAME, rmdir, s///, scalar -EXPR, seek FILEHANDLE,POSITION,WHENCE, seekdir DIRHANDLE,POS, select -FILEHANDLE, select, select RBITS,WBITS,EBITS,TIMEOUT, semctl -ID,SEMNUM,CMD,ARG, semget KEY,NSEMS,FLAGS, semop KEY,OPSTRING, send -SOCKET,MSG,FLAGS,TO, send SOCKET,MSG,FLAGS, setpgrp PID,PGRP, setpriority -WHICH,WHO,PRIORITY, setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL, shift ARRAY, -shift, shmctl ID,CMD,ARG, shmget KEY,SIZE,FLAGS, shmread ID,VAR,POS,SIZE, -shmwrite ID,STRING,POS,SIZE, shutdown SOCKET,HOW, sin EXPR, sin, sleep -EXPR, sleep, socket SOCKET,DOMAIN,TYPE,PROTOCOL, socketpair -SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL, sort SUBNAME LIST, sort BLOCK LIST, -sort LIST, splice ARRAY,OFFSET,LENGTH,LIST, splice ARRAY,OFFSET,LENGTH, -splice ARRAY,OFFSET, splice ARRAY, split /PATTERN/,EXPR,LIMIT, split -/PATTERN/,EXPR, split /PATTERN/, split, sprintf FORMAT, LIST, sqrt EXPR, -sqrt, srand EXPR, srand, stat FILEHANDLE, stat EXPR, stat, study SCALAR, -study, sub BLOCK, sub NAME, sub NAME BLOCK, substr -EXPR,OFFSET,LENGTH,REPLACEMENT, substr EXPR,OFFSET,LENGTH, substr -EXPR,OFFSET, symlink OLDFILE,NEWFILE, syscall LIST, sysopen -FILEHANDLE,FILENAME,MODE, sysopen FILEHANDLE,FILENAME,MODE,PERMS, sysread -FILEHANDLE,SCALAR,LENGTH,OFFSET, sysread FILEHANDLE,SCALAR,LENGTH, sysseek -FILEHANDLE,POSITION,WHENCE, system LIST, system PROGRAM LIST, syswrite -FILEHANDLE,SCALAR,LENGTH,OFFSET, syswrite FILEHANDLE,SCALAR,LENGTH, -syswrite FILEHANDLE,SCALAR, tell FILEHANDLE, tell, telldir DIRHANDLE, tie -VARIABLE,CLASSNAME,LIST, tied VARIABLE, time, times, tr///, truncate -FILEHANDLE,LENGTH, truncate EXPR,LENGTH, uc EXPR, uc, ucfirst EXPR, -ucfirst, umask EXPR, umask, undef EXPR, undef, unlink LIST, unlink, unpack -TEMPLATE,EXPR, untie VARIABLE, unshift ARRAY,LIST, use Module VERSION LIST, -use Module VERSION, use Module LIST, use Module, use VERSION, utime LIST, -values HASH, vec EXPR,OFFSET,BITS, wait, waitpid PID,FLAGS, wantarray, warn -LIST, write FILEHANDLE, write EXPR, write, y/// +=item SEE ALSO -=back +=item AUTHOR =back @@ -1131,326 +1214,350 @@ LIST, write FILEHANDLE, write EXPR, write, y/// =back -=head2 perlvar - Perl predefined variables +=head2 perlretut - Perl regular expressions tutorial =over =item DESCRIPTION -=over +=item Part 1: The basics -=item Predefined Names +=over -$ARG, $_, $<I<digits>>, $MATCH, $&, $PREMATCH, $`, $POSTMATCH, $', -$LAST_PAREN_MATCH, $+, @LAST_MATCH_END, @+, $MULTILINE_MATCHING, $*, -input_line_number HANDLE EXPR, $INPUT_LINE_NUMBER, $NR, $, -input_record_separator HANDLE EXPR, $INPUT_RECORD_SEPARATOR, $RS, $/, -autoflush HANDLE EXPR, $OUTPUT_AUTOFLUSH, $|, output_field_separator HANDLE -EXPR, $OUTPUT_FIELD_SEPARATOR, $OFS, $,, output_record_separator HANDLE -EXPR, $OUTPUT_RECORD_SEPARATOR, $ORS, $\, $LIST_SEPARATOR, $", -$SUBSCRIPT_SEPARATOR, $SUBSEP, $;, $OFMT, $#, format_page_number HANDLE -EXPR, $FORMAT_PAGE_NUMBER, $%, format_lines_per_page HANDLE EXPR, -$FORMAT_LINES_PER_PAGE, $=, format_lines_left HANDLE EXPR, -$FORMAT_LINES_LEFT, $-, @LAST_MATCH_START, @-, C<$`> is the same as -C<substr($var, 0, $-[0])>, C<$&> is the same as C<substr($var, $-[0], $+[0] -- $-[0])>, C<$'> is the same as C<substr($var, $+[0])>, C<$1> is the same -as C<substr($var, $-[1], $+[1] - $-[1])>, C<$2> is the same as -C<substr($var, $-[2], $+[2] - $-[2])>, C<$3> is the same as C<substr $var, -$-[3], $+[3] - $-[3])>, format_name HANDLE EXPR, $FORMAT_NAME, $~, -format_top_name HANDLE EXPR, $FORMAT_TOP_NAME, $^, -format_line_break_characters HANDLE EXPR, $FORMAT_LINE_BREAK_CHARACTERS, -$:, format_formfeed HANDLE EXPR, $FORMAT_FORMFEED, $^L, $ACCUMULATOR, $^A, -$CHILD_ERROR, $?, $OS_ERROR, $ERRNO, $!, $EXTENDED_OS_ERROR, $^E, -$EVAL_ERROR, $@, $PROCESS_ID, $PID, $$, $REAL_USER_ID, $UID, $<, -$EFFECTIVE_USER_ID, $EUID, $>, $REAL_GROUP_ID, $GID, $(, -$EFFECTIVE_GROUP_ID, $EGID, $), $PROGRAM_NAME, $0, $[, $], $COMPILING, $^C, -$DEBUGGING, $^D, $SYSTEM_FD_MAX, $^F, $^H, %^H, $INPLACE_EDIT, $^I, $^M, -$OSNAME, $^O, $PERLDB, $^P, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, -0x100, 0x200, $LAST_REGEXP_CODE_RESULT, $^R, $EXCEPTIONS_BEING_CAUGHT, $^S, -$BASETIME, $^T, $PERL_VERSION, $^V, $WARNING, $^W, ${^WARNING_BITS}, -${^WIDE_SYSTEM_CALLS}, $EXECUTABLE_NAME, $^X, $ARGV, @ARGV, @INC, @_, %INC, -%ENV, $ENV{expr}, %SIG, $SIG{expr} +=item Simple word matching -=item Error Indicators +=item Using character classes -=item Technical Note on the Syntax of Variable Names +\d is a digit and represents [0-9], \s is a whitespace character and +represents [\ \t\r\n\f], \w is a word character (alphanumeric or _) and +represents [0-9a-zA-Z_], \D is a negated \d; it represents any character +but a digit [^0-9], \S is a negated \s; it represents any non-whitespace +character [^\s], \W is a negated \w; it represents any non-word character +[^\w], The period '.' matches any character but "\n", no modifiers (//): +Default behavior. C<'.'> matches any character except C<"\n">. C<^> +matches only at the beginning of the string and C<$> matches only at the +end or before a newline at the end, s modifier (//s): Treat string as a +single long line. C<'.'> matches any character, even C<"\n">. C<^> +matches only at the beginning of the string and C<$> matches only at the +end or before a newline at the end, m modifier (//m): Treat string as a set +of multiple lines. C<'.'> matches any character except C<"\n">. C<^> and +C<$> are able to match at the start or end of I<any> line within the +string, both s and m modifiers (//sm): Treat string as a single long line, +but detect multiple lines. C<'.'> matches any character, even C<"\n">. +C<^> and C<$>, however, are able to match at the start or end of I<any> +line within the string -=back +=item Matching this or that -=item BUGS +=item Grouping things and hierarchical matching -=back +0 Start with the first letter in the string 'a', 1 Try the first +alternative in the first group 'abd', 2 Match 'a' followed by 'b'. So far +so good, 3 'd' in the regexp doesn't match 'c' in the string - a dead end. +So backtrack two characters and pick the second alternative in the first +group 'abc', 4 Match 'a' followed by 'b' followed by 'c'. We are on a roll +and have satisfied the first group. Set $1 to 'abc', 5 Move on to the +second group and pick the first alternative 'df', 6 Match the 'd', 7 'f' in +the regexp doesn't match 'e' in the string, so a dead end. Backtrack one +character and pick the second alternative in the second group 'd', 8 'd' +matches. The second grouping is satisfied, so set $2 to 'd', 9 We are at +the end of the regexp, so we are done! We have matched 'abcd' out of the +string "abcde" -=head2 perlsub - Perl subroutines +=item Extracting matches -=over +=item Matching repetitions -=item SYNOPSIS +C<a?> = match 'a' 1 or 0 times, C<a*> = match 'a' 0 or more times, i.e., +any number of times, C<a+> = match 'a' 1 or more times, i.e., at least +once, C<a{n,m}> = match at least C<n> times, but not more than C<m> times, +C<a{n,}> = match at least C<n> or more times, C<a{n}> = match exactly C<n> +times, Principle 0: Taken as a whole, any regexp will be matched at the +earliest possible position in the string, Principle 1: In an alternation +C<a|b|c...>, the leftmost alternative that allows a match for the whole +regexp will be the one used, Principle 2: The maximal matching quantifiers +C<?>, C<*>, C<+> and C<{n,m}> will in general match as much of the string +as possible while still allowing the whole regexp to match, Principle 3: If +there are two or more elements in a regexp, the leftmost greedy quantifier, +if any, will match as much of the string as possible while still allowing +the whole regexp to match. The next leftmost greedy quantifier, if any, +will try to match as much of the string remaining available to it as +possible, while still allowing the whole regexp to match. And so on, until +all the regexp elements are satisfied, C<a??> = match 'a' 0 or 1 times. Try +0 first, then 1, C<a*?> = match 'a' 0 or more times, i.e., any number of +times, but as few times as possible, C<a+?> = match 'a' 1 or more times, +i.e., at least once, but as few times as possible, C<a{n,m}?> = match at +least C<n> times, not more than C<m> times, as few times as possible, +C<a{n,}?> = match at least C<n> times, but as few times as possible, +C<a{n}?> = match exactly C<n> times. Because we match exactly C<n> times, +C<a{n}?> is equivalent to C<a{n}> and is just there for notational +consistency, Principle 3: If there are two or more elements in a regexp, +the leftmost greedy (non-greedy) quantifier, if any, will match as much +(little) of the string as possible while still allowing the whole regexp to +match. The next leftmost greedy (non-greedy) quantifier, if any, will try +to match as much (little) of the string remaining available to it as +possible, while still allowing the whole regexp to match. And so on, until +all the regexp elements are satisfied, 0 Start with the first letter in the +string 't', 1 The first quantifier '.*' starts out by matching the whole +string 'the cat in the hat', 2 'a' in the regexp element 'at' doesn't match +the end of the string. Backtrack one character, 3 'a' in the regexp +element 'at' still doesn't match the last letter of the string 't', so +backtrack one more character, 4 Now we can match the 'a' and the 't', 5 +Move on to the third element '.*'. Since we are at the end of the string +and '.*' can match 0 times, assign it the empty string, 6 We are done! -=item DESCRIPTION +=item Building a regexp -=over +specifying the task in detail,, breaking down the problem into smaller +parts,, translating the small parts into regexps,, combining the regexps,, +and optimizing the final combined regexp -=item Private Variables via my() +=item Using regular expressions in Perl -=item Persistent Private Variables +=back -=item Temporary Values via local() +=item Part 2: Power tools -=item Lvalue subroutines +=over -=item Passing Symbol Table Entries (typeglobs) +=item More on characters, strings, and character classes -=item When to Still Use local() +=item Compiling and saving regular expressions -1. You need to give a global variable a temporary value, especially $_, 2. -You need to create a local file or directory handle or a local function, 3. -You want to temporarily change just one element of an array or hash +=item Embedding comments and modifiers in a regular expression -=item Pass by Reference +=item Non-capturing groupings -=item Prototypes +=item Looking ahead and looking behind -=item Constant Functions +=item Using independent subexpressions to prevent backtracking -=item Overriding Built-in Functions +=item Conditional expressions -=item Autoloading +=item A bit of magic: executing Perl code in a regular expression -=item Subroutine Attributes +=item Pragmas and debugging =back +=item BUGS + =item SEE ALSO +=item AUTHOR AND COPYRIGHT + +=over + +=item Acknowledgments + =back -=head2 perlmod - Perl modules (packages and symbol tables) +=back + +=head2 perlref - Perl references and nested data structures =over +=item NOTE + =item DESCRIPTION =over -=item Packages +=item Making References -=item Symbol Tables +=item Using References -=item Package Constructors and Destructors +=item Symbolic references -=item Perl Classes +=item Not-so-symbolic references -=item Perl Modules +=item Pseudo-hashes: Using an array as a hash + +=item Function Templates =back +=item WARNING + =item SEE ALSO =back -=head2 perlpod - plain old documentation +=head2 perlre - Perl regular expressions =over =item DESCRIPTION +i, m, s, x + =over -=item Verbatim Paragraph +=item Regular Expressions -=item Command Paragraph +cntrl, graph, print, punct, xdigit -=item Ordinary Block of Text +=item Extended Patterns -=item The Intent +C<(?#text)>, C<(?imsx-imsx)>, C<(?:pattern)>, C<(?imsx-imsx:pattern)>, +C<(?=pattern)>, C<(?!pattern)>, C<(?<=pattern)>, C<(?<!pattern)>, C<(?{ +code })>, C<(??{ code })>, C<< (?>pattern) >>, +C<(?(condition)yes-pattern|no-pattern)>, C<(?(condition)yes-pattern)> -=item Embedding Pods in Perl Modules +=item Backtracking -=item Common Pod Pitfalls +=item Version 8 Regular Expressions -=back +=item Warning on \1 vs $1 -=item SEE ALSO +=item Repeated patterns matching zero-length substring -=item AUTHOR +=item Combining pieces together -=back +C<ST>, C<S|T>, C<S{REPEAT_COUNT}>, C<S{min,max}>, C<S{min,max}?>, C<S?>, +C<S*>, C<S+>, C<S??>, C<S*?>, C<S+?>, C<< (?>S) >>, C<(?=S)>, C<(?<=S)>, +C<(?!S)>, C<(?<!S)>, C<(??{ EXPR })>, +C<(?(condition)yes-pattern|no-pattern)> -=head2 perlstyle - Perl style guide +=item Creating custom RE engines -=over +=back -=item DESCRIPTION +=item BUGS + +=item SEE ALSO =back -=head2 perlmodlib - constructing new Perl modules and finding existing ones +=head2 perlform - Perl formats =over =item DESCRIPTION -=item THE PERL MODULE LIBRARY - =over -=item Pragmatic Modules +=item Format Variables -attributes, attrs, autouse, base, blib, bytes, charnames, constant, -diagnostics, fields, filetest, integer, less, locale, open, ops, overload, -re, sigtrap, strict, subs, utf8, vars, warnings +=back -=item Standard Modules +=item NOTES -AnyDBM_File, AutoLoader, AutoSplit, B, B::Asmdata, B::Assembler, B::Bblock, -B::Bytecode, B::C, B::CC, B::Debug, B::Deparse, B::Disassembler, B::Lint, -B::Showlex, B::Stackobj, B::Terse, B::Xref, Benchmark, ByteLoader, CGI, -CGI::Apache, CGI::Carp, CGI::Cookie, CGI::Fast, CGI::Pretty, CGI::Push, -CGI::Switch, CPAN, CPAN::FirstTime, CPAN::Nox, Carp, Carp::Heavy, -Class::Struct, Cwd, DB, DB_File, Devel::SelfStubber, DirHandle, Dumpvalue, -English, Env, Exporter, Exporter::Heavy, ExtUtils::Command, -ExtUtils::Embed, ExtUtils::Install, ExtUtils::Installed, ExtUtils::Liblist, -ExtUtils::MM_Cygwin, ExtUtils::MM_OS2, ExtUtils::MM_Unix, ExtUtils::MM_VMS, -ExtUtils::MM_Win32, ExtUtils::MakeMaker, ExtUtils::Manifest, -ExtUtils::Mkbootstrap, ExtUtils::Mksymlists, ExtUtils::Packlist, -ExtUtils::testlib, Fatal, Fcntl, File::Basename, File::CheckTree, -File::Compare, File::Copy, File::DosGlob, File::Find, File::Path, -File::Spec, File::Spec::Functions, File::Spec::Mac, File::Spec::OS2, -File::Spec::Unix, File::Spec::VMS, File::Spec::Win32, File::Temp, -File::stat, FileCache, FileHandle, FindBin, Getopt::Long, Getopt::Std, -I18N::Collate, IO, IPC::Open2, IPC::Open3, Math::BigFloat, Math::BigInt, -Math::Complex, Math::Trig, NDBM_File, Net::Ping, Net::hostent, Net::netent, -Net::protoent, Net::servent, O, ODBM_File, Opcode, Pod::Checker, Pod::Find, -Pod::Html, Pod::InputObjects, Pod::LaTeX, Pod::Man, Pod::ParseUtils, -Pod::Parser, Pod::Plainer, Pod::Select, Pod::Text, Pod::Text::Color, -Pod::Text::Termcap, Pod::Usage, SDBM_File, Safe, Search::Dict, SelectSaver, -SelfLoader, Shell, Socket, Symbol, Term::ANSIColor, Term::Cap, -Term::Complete, Term::ReadLine, Test, Test::Harness, Text::Abbrev, -Text::ParseWords, Text::Soundex, Text::Wrap, Tie::Array, Tie::Handle, -Tie::Hash, Tie::RefHash, Tie::Scalar, Tie::SubstrHash, Time::Local, -Time::gmtime, Time::localtime, Time::tm, UNIVERSAL, User::grent, -User::pwent +=over -=item Extension Modules +=item Footers + +=item Accessing Formatting Internals =back -=item CPAN +=item WARNINGS -Language Extensions and Documentation Tools, Development Support, Operating -System Interfaces, Networking, Device Control (modems) and InterProcess -Communication, Data Types and Data Type Utilities, Database Interfaces, -User Interfaces, Interfaces to / Emulations of Other Programming Languages, -File Names, File Systems and File Locking (see also File Handles), String -Processing, Language Text Processing, Parsing, and Searching, Option, -Argument, Parameter, and Configuration File Processing, -Internationalization and Locale, Authentication, Security, and Encryption, -World Wide Web, HTML, HTTP, CGI, MIME, Server and Daemon Utilities, -Archiving and Compression, Images, Pixmap and Bitmap Manipulation, Drawing, -and Graphing, Mail and Usenet News, Control Flow Utilities (callbacks and -exceptions etc), File Handle and Input/Output Stream Utilities, -Miscellaneous Modules, Africa, Asia, Australasia, Central America, Europe, -North America, South America +=back -=item Modules: Creation, Use, and Abuse +=head2 perllocale - Perl locale handling (internationalization and +localization) =over -=item Guidelines for Module Creation +=item DESCRIPTION -Do similar modules already exist in some form?, Try to design the new -module to be easy to extend and reuse, Some simple style guidelines, Select -what to export, Select a name for the module, Have you got it right?, -README and other Additional Files, A description of the -module/package/extension etc, A copyright notice - see below, Prerequisites -- what else you may need to have, How to build it - possible changes to -Makefile.PL etc, How to install it, Recent changes in this release, -especially incompatibilities, Changes / enhancements you plan to make in -the future, Adding a Copyright Notice, Give the module a -version/issue/release number, How to release and distribute a module, Take -care when changing a released module +=item PREPARING TO USE LOCALES -=item Guidelines for Converting Perl 4 Library Scripts into Modules +=item USING LOCALES -There is no requirement to convert anything, Consider the implications, -Make the most of the opportunity, The pl2pm utility will get you started, -Adds the standard Module prologue lines, Converts package specifiers from ' -to ::, Converts die(...) to croak(...), Several other minor changes +=over -=item Guidelines for Reusing Application Code +=item The use locale pragma -Complete applications rarely belong in the Perl Module Library, Many -applications contain some Perl code that could be reused, Break-out the -reusable code into one or more separate module files, Take the opportunity -to reconsider and redesign the interfaces, In some cases the 'application' -can then be reduced to a small +=item The setlocale function -=back +=item Finding locales -=item NOTE +=item LOCALE PROBLEMS + +=item Temporarily fixing locale problems + +=item Permanently fixing locale problems + +=item Permanently fixing your system's locale configuration + +=item Fixing system locale configuration + +=item The localeconv function =back -=head2 perlmodinstall - Installing CPAN Modules +=item LOCALE CATEGORIES =over -=item DESCRIPTION +=item Category LC_COLLATE: Collation -=over +=item Category LC_CTYPE: Character Types -=item PREAMBLE +=item Category LC_NUMERIC: Numeric Formatting -B<DECOMPRESS> the file, B<UNPACK> the file into a directory, B<BUILD> the -module (sometimes unnecessary), B<INSTALL> the module +=item Category LC_MONETARY: Formatting of monetary amounts + +=item LC_TIME + +=item Other categories =back -=item HEY +=item SECURITY -=item AUTHOR +B<Comparison operators> (C<lt>, C<le>, C<ge>, C<gt> and C<cmp>):, +B<Case-mapping interpolation> (with C<\l>, C<\L>, C<\u> or C<\U>), +B<Matching operator> (C<m//>):, B<Substitution operator> (C<s///>):, +B<Output formatting functions> (printf() and write()):, B<Case-mapping +functions> (lc(), lcfirst(), uc(), ucfirst()):, B<POSIX locale-dependent +functions> (localeconv(), strcoll(), strftime(), strxfrm()):, B<POSIX +character class tests> (isalnum(), isalpha(), isdigit(), isgraph(), +islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()): -=item COPYRIGHT +=item ENVIRONMENT -=back +PERL_BADLANG, LC_ALL, LANGUAGE, LC_CTYPE, LC_COLLATE, LC_MONETARY, +LC_NUMERIC, LC_TIME, LANG -=head2 perlnewmod - preparing a new module for distribution +=item NOTES =over -=item DESCRIPTION +=item Backward compatibility -=over +=item I18N:Collate obsolete -=item Warning +=item Sort speed and memory use impacts -=item What should I make into a module? +=item write() and LC_NUMERIC -=item Step-by-step: Preparing the ground +=item Freely available locale definitions -Look around, Check it's new, Discuss the need, Choose a name, Check again +=item I18n and l10n -=item Step-by-step: Making the module +=item An imperfect standard -Start with F<h2xs>, Use L<strict|strict> and L<warnings|warnings>, Use -L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!, Use L<plain old -documentation|perlpod>, Write tests, Write the README +=back -=item Step-by-step: Distributing your module +=item BUGS -Get a CPAN user ID, C<perl Makefile.PL; make test; make dist>, Upload the -tarball, Announce to the modules list, Announce to clpa, Fix bugs! +=over -=back +=item Broken systems -=item AUTHOR +=back =item SEE ALSO +=item HISTORY + =back -=head2 perltrap - Perl traps for the unwary +=head2 perlunicode - Unicode support in Perl =over @@ -1458,434 +1565,407 @@ tarball, Announce to the modules list, Announce to clpa, Fix bugs! =over -=item Awk Traps - -=item C Traps +=item Important Caveat -=item Sed Traps +Input and Output Disciplines, Regular Expressions, C<use utf8> still needed +to enable a few features -=item Shell Traps +=item Byte and Character semantics -=item Perl Traps +=item Effects of character semantics -=item Perl4 to Perl5 Traps +=item Character encodings for input and output -Discontinuance, Deprecation, and BugFix traps, Parsing Traps, Numerical -Traps, General data type traps, Context Traps - scalar, list contexts, -Precedence Traps, General Regular Expression Traps using s///, etc, -Subroutine, Signal, Sorting Traps, OS Traps, DBM Traps, Unclassified Traps +=back -=item Discontinuance, Deprecation, and BugFix traps +=item CAVEATS -Discontinuance, Deprecation, BugFix, Discontinuance, Discontinuance, -Discontinuance, BugFix, Discontinuance, Discontinuance, BugFix, -Discontinuance, Deprecation, Discontinuance, Discontinuance +=item SEE ALSO -=item Parsing Traps +=back -Parsing, Parsing, Parsing, Parsing +=head2 perlipc - Perl interprocess communication (signals, fifos, pipes, +safe subprocesses, sockets, and semaphores) -=item Numerical Traps +=over -Numerical, Numerical, Numerical, Bitwise string ops +=item DESCRIPTION -=item General data type traps +=item Signals -(Arrays), (Arrays), (Hashes), (Globs), (Globs), (Scalar String), -(Constants), (Scalars), (Variable Suicide) +=item Named Pipes -=item Context Traps - scalar, list contexts +=over -(list context), (scalar context), (scalar context), (list, builtin) +=item WARNING -=item Precedence Traps +=back -Precedence, Precedence, Precedence, Precedence, Precedence, Precedence, -Precedence +=item Using open() for IPC -=item General Regular Expression Traps using s///, etc. +=over -Regular Expression, Regular Expression, Regular Expression, Regular -Expression, Regular Expression, Regular Expression, Regular Expression, -Regular Expression +=item Filehandles -=item Subroutine, Signal, Sorting Traps +=item Background Processes -(Signals), (Sort Subroutine), warn() won't let you specify a filehandle +=item Complete Dissociation of Child from Parent -=item OS Traps +=item Safe Pipe Opens -(SysV), (SysV) +=item Bidirectional Communication with Another Process -=item Interpolation Traps +=item Bidirectional Communication with Yourself -Interpolation, Interpolation, Interpolation, Interpolation, Interpolation, -Interpolation, Interpolation, Interpolation, Interpolation +=back -=item DBM Traps +=item Sockets: Client/Server Communication -DBM, DBM +=over -=item Unclassified Traps +=item Internet Line Terminators -C<require>/C<do> trap using returned value, C<split> on empty string with -LIMIT specified +=item Internet TCP Clients and Servers -=back +=item Unix-Domain TCP Clients and Servers =back -=head2 perlport - Writing portable Perl +=item TCP Clients with IO::Socket =over -=item DESCRIPTION - -Not all Perl programs have to be portable, Nearly all of Perl already I<is> -portable +=item A Simple Client -=item ISSUES +C<Proto>, C<PeerAddr>, C<PeerPort> -=over +=item A Webget Client -=item Newlines +=item Interactive Client with IO::Socket -=item Numbers endianness and Width +=back -=item Files and Filesystems +=item TCP Servers with IO::Socket -=item System Interaction +Proto, LocalPort, Listen, Reuse -=item Interprocess Communication (IPC) +=item UDP: Message Passing -=item External Subroutines (XS) +=item SysV IPC -=item Standard Modules +=item NOTES -=item Time and Date +=item BUGS -=item Character sets and character encoding +=item AUTHOR -=item Internationalisation +=item SEE ALSO -=item System Resources +=back -=item Security +=head2 perlfork - Perl's fork() emulation -=item Style +=over -=back +=item SYNOPSIS -=item CPAN Testers +=item DESCRIPTION -Mailing list: cpan-testers@perl.org, Testing results: -http://testers.cpan.org/ +=over -=item PLATFORMS +=item Behavior of other Perl features in forked pseudo-processes -=over +$$ or $PROCESS_ID, %ENV, chdir() and all other builtins that accept +filenames, wait() and waitpid(), kill(), exec(), exit(), Open handles to +files, directories and network sockets -=item Unix +=item Resource limits -=item DOS and Derivatives +=item Killing the parent process -Build instructions for OS/2, L<perlos2> +=item Lifetime of the parent process and pseudo-processes -=item S<Mac OS> +=item CAVEATS AND LIMITATIONS -=item VMS +BEGIN blocks, Open filehandles, Forking pipe open() not yet implemented, +Global state maintained by XSUBs, Interpreter embedded in larger +application, Thread-safety of extensions -=item VOS +=back -=item EBCDIC Platforms +=item BUGS -=item Acorn RISC OS +=item AUTHOR -=item Other perls +=item SEE ALSO =back -=item FUNCTION IMPLEMENTATIONS +=head2 perlnumber - semantics of numbers and numeric operations in Perl =over -=item Alphabetical Listing of Perl Functions - --I<X> FILEHANDLE, -I<X> EXPR, -I<X>, alarm SECONDS, alarm, binmode -FILEHANDLE, chmod LIST, chown LIST, chroot FILENAME, chroot, crypt -PLAINTEXT,SALT, dbmclose HASH, dbmopen HASH,DBNAME,MODE, dump LABEL, exec -LIST, fcntl FILEHANDLE,FUNCTION,SCALAR, flock FILEHANDLE,OPERATION, fork, -getlogin, getpgrp PID, getppid, getpriority WHICH,WHO, getpwnam NAME, -getgrnam NAME, getnetbyname NAME, getpwuid UID, getgrgid GID, getnetbyaddr -ADDR,ADDRTYPE, getprotobynumber NUMBER, getservbyport PORT,PROTO, getpwent, -getgrent, gethostent, getnetent, getprotoent, getservent, setpwent, -setgrent, sethostent STAYOPEN, setnetent STAYOPEN, setprotoent STAYOPEN, -setservent STAYOPEN, endpwent, endgrent, endhostent, endnetent, -endprotoent, endservent, getsockopt SOCKET,LEVEL,OPTNAME, glob EXPR, glob, -ioctl FILEHANDLE,FUNCTION,SCALAR, kill SIGNAL, LIST, link OLDFILE,NEWFILE, -lstat FILEHANDLE, lstat EXPR, lstat, msgctl ID,CMD,ARG, msgget KEY,FLAGS, -msgsnd ID,MSG,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, open FILEHANDLE,EXPR, -open FILEHANDLE, pipe READHANDLE,WRITEHANDLE, readlink EXPR, readlink, -select RBITS,WBITS,EBITS,TIMEOUT, semctl ID,SEMNUM,CMD,ARG, semget -KEY,NSEMS,FLAGS, semop KEY,OPSTRING, setgrent, setpgrp PID,PGRP, -setpriority WHICH,WHO,PRIORITY, setpwent, setsockopt -SOCKET,LEVEL,OPTNAME,OPTVAL, shmctl ID,CMD,ARG, shmget KEY,SIZE,FLAGS, -shmread ID,VAR,POS,SIZE, shmwrite ID,STRING,POS,SIZE, socketpair -SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL, stat FILEHANDLE, stat EXPR, stat, -symlink OLDFILE,NEWFILE, syscall LIST, sysopen -FILEHANDLE,FILENAME,MODE,PERMS, system LIST, times, truncate -FILEHANDLE,LENGTH, truncate EXPR,LENGTH, umask EXPR, umask, utime LIST, -wait, waitpid PID,FLAGS +=item SYNOPSIS -=back +=item DESCRIPTION -=item CHANGES +=item Storing numbers -v1.47, 22 March 2000, v1.46, 12 February 2000, v1.45, 20 December 1999, -v1.44, 19 July 1999, v1.43, 24 May 1999, v1.42, 22 May 1999, v1.41, 19 May -1999, v1.40, 11 April 1999, v1.39, 11 February 1999, v1.38, 31 December -1998, v1.37, 19 December 1998, v1.36, 9 September 1998, v1.35, 13 August -1998, v1.33, 06 August 1998, v1.32, 05 August 1998, v1.30, 03 August 1998, -v1.23, 10 July 1998 +=item Numeric operators and numeric conversions -=item Supported Platforms +=item Flavors of Perl numeric operations -=item SEE ALSO +Arithmetic operators except, C<no integer>, Arithmetic operators except, +C<use integer>, Bitwise operators, C<no integer>, Bitwise operators, C<use +integer>, Operators which expect an integer, Operators which expect a +string -=item AUTHORS / CONTRIBUTORS +=item AUTHOR -=item VERSION +=item SEE ALSO =back -=head2 perlsec - Perl security +=head2 perlthrtut - tutorial on threads in Perl =over =item DESCRIPTION -=over - -=item Laundering and Detecting Tainted Data - -=item Switches On the "#!" Line +=item What Is A Thread Anyway? -=item Cleaning Up Your Path +=item Threaded Program Models -=item Security Bugs +=over -=item Protecting Your Programs +=item Boss/Worker -=back +=item Work Crew -=item SEE ALSO +=item Pipeline =back -=head2 perlref - Perl references and nested data structures +=item Native threads -=over +=item What kind of threads are perl threads? -=item NOTE +=item Threadsafe Modules -=item DESCRIPTION +=item Thread Basics =over -=item Making References - -=item Using References - -=item Symbolic references - -=item Not-so-symbolic references +=item Basic Thread Support -=item Pseudo-hashes: Using an array as a hash +=item Creating Threads -=item Function Templates +=item Giving up control -=back +=item Waiting For A Thread To Exit -=item WARNING +=item Errors In Threads -=item SEE ALSO +=item Ignoring A Thread =back -=head2 perlre - Perl regular expressions +=item Threads And Data =over -=item DESCRIPTION +=item Shared And Unshared Data -i, m, s, x +=item Thread Pitfall: Races -=over +=item Controlling access: lock() -=item Regular Expressions +=item Thread Pitfall: Deadlocks -cntrl, graph, print, punct, xdigit +=item Queues: Passing Data Around -=item Extended Patterns +=back -C<(?#text)>, C<(?imsx-imsx)>, C<(?:pattern)>, C<(?imsx-imsx:pattern)>, -C<(?=pattern)>, C<(?!pattern)>, C<(?<=pattern)>, C<(?<!pattern)>, C<(?{ -code })>, C<(??{ code })>, C<< (?>pattern) >>, -C<(?(condition)yes-pattern|no-pattern)>, C<(?(condition)yes-pattern)> +=item Threads And Code -=item Backtracking +=over -=item Version 8 Regular Expressions +=item Semaphores: Synchronizing Data Access -=item Warning on \1 vs $1 +Basic semaphores, Advanced Semaphores -=item Repeated patterns matching zero-length substring +=item Attributes: Restricting Access To Subroutines -=item Combining pieces together +=item Subroutine Locks -C<ST>, C<S|T>, C<S{REPEAT_COUNT}>, C<S{min,max}>, C<S{min,max}?>, C<S?>, -C<S*>, C<S+>, C<S??>, C<S*?>, C<S+?>, C<< (?>S) >>, C<(?=S)>, C<(?<=S)>, -C<(?!S)>, C<(?<!S)>, C<(??{ EXPR })>, -C<(?(condition)yes-pattern|no-pattern)> +=item Methods -=item Creating custom RE engines +=item Locking A Subroutine =back -=item BUGS +=item General Thread Utility Routines -=item SEE ALSO +=over -=back +=item What Thread Am I In? -=head2 perlform - Perl formats +=item Thread IDs -=over +=item Are These Threads The Same? -=item DESCRIPTION +=item What Threads Are Running? -=over +=back -=item Format Variables +=item A Complete Example -=back +=item Conclusion -=item NOTES +=item Bibliography =over -=item Footers +=item Introductory Texts -=item Accessing Formatting Internals +=item OS-Related References + +=item Other References =back -=item WARNINGS +=item Acknowledgements + +=item AUTHOR + +=item Copyrights =back -=head2 perllocale - Perl locale handling (internationalization and -localization) +=head2 perlport - Writing portable Perl =over =item DESCRIPTION -=item PREPARING TO USE LOCALES +Not all Perl programs have to be portable, Nearly all of Perl already I<is> +portable -=item USING LOCALES +=item ISSUES =over -=item The use locale pragma +=item Newlines -=item The setlocale function +=item Numbers endianness and Width -=item Finding locales +=item Files and Filesystems -=item LOCALE PROBLEMS +=item System Interaction -=item Temporarily fixing locale problems +=item Interprocess Communication (IPC) -=item Permanently fixing locale problems +=item External Subroutines (XS) -=item Permanently fixing your system's locale configuration +=item Standard Modules -=item Fixing system locale configuration +=item Time and Date -=item The localeconv function +=item Character sets and character encoding -=back +=item Internationalisation -=item LOCALE CATEGORIES +=item System Resources -=over +=item Security -=item Category LC_COLLATE: Collation +=item Style -=item Category LC_CTYPE: Character Types +=back -=item Category LC_NUMERIC: Numeric Formatting +=item CPAN Testers -=item Category LC_MONETARY: Formatting of monetary amounts +Mailing list: cpan-testers@perl.org, Testing results: +http://testers.cpan.org/ -=item LC_TIME +=item PLATFORMS -=item Other categories +=over -=back +=item Unix -=item SECURITY +=item DOS and Derivatives -B<Comparison operators> (C<lt>, C<le>, C<ge>, C<gt> and C<cmp>):, -B<Case-mapping interpolation> (with C<\l>, C<\L>, C<\u> or C<\U>), -B<Matching operator> (C<m//>):, B<Substitution operator> (C<s///>):, -B<Output formatting functions> (printf() and write()):, B<Case-mapping -functions> (lc(), lcfirst(), uc(), ucfirst()):, B<POSIX locale-dependent -functions> (localeconv(), strcoll(), strftime(), strxfrm()):, B<POSIX -character class tests> (isalnum(), isalpha(), isdigit(), isgraph(), -islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()): +Build instructions for OS/2, L<perlos2> -=item ENVIRONMENT +=item S<Mac OS> -PERL_BADLANG, LC_ALL, LANGUAGE, LC_CTYPE, LC_COLLATE, LC_MONETARY, -LC_NUMERIC, LC_TIME, LANG +=item VMS -=item NOTES +=item VOS -=over +=item EBCDIC Platforms -=item Backward compatibility +=item Acorn RISC OS -=item I18N:Collate obsolete +=item Other perls -=item Sort speed and memory use impacts +=back -=item write() and LC_NUMERIC +=item FUNCTION IMPLEMENTATIONS -=item Freely available locale definitions +=over -=item I18n and l10n +=item Alphabetical Listing of Perl Functions -=item An imperfect standard +-I<X> FILEHANDLE, -I<X> EXPR, -I<X>, alarm SECONDS, alarm, binmode +FILEHANDLE, chmod LIST, chown LIST, chroot FILENAME, chroot, crypt +PLAINTEXT,SALT, dbmclose HASH, dbmopen HASH,DBNAME,MODE, dump LABEL, exec +LIST, fcntl FILEHANDLE,FUNCTION,SCALAR, flock FILEHANDLE,OPERATION, fork, +getlogin, getpgrp PID, getppid, getpriority WHICH,WHO, getpwnam NAME, +getgrnam NAME, getnetbyname NAME, getpwuid UID, getgrgid GID, getnetbyaddr +ADDR,ADDRTYPE, getprotobynumber NUMBER, getservbyport PORT,PROTO, getpwent, +getgrent, gethostent, getnetent, getprotoent, getservent, setpwent, +setgrent, sethostent STAYOPEN, setnetent STAYOPEN, setprotoent STAYOPEN, +setservent STAYOPEN, endpwent, endgrent, endhostent, endnetent, +endprotoent, endservent, getsockopt SOCKET,LEVEL,OPTNAME, glob EXPR, glob, +ioctl FILEHANDLE,FUNCTION,SCALAR, kill SIGNAL, LIST, link OLDFILE,NEWFILE, +lstat FILEHANDLE, lstat EXPR, lstat, msgctl ID,CMD,ARG, msgget KEY,FLAGS, +msgsnd ID,MSG,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, open FILEHANDLE,EXPR, +open FILEHANDLE, pipe READHANDLE,WRITEHANDLE, readlink EXPR, readlink, +select RBITS,WBITS,EBITS,TIMEOUT, semctl ID,SEMNUM,CMD,ARG, semget +KEY,NSEMS,FLAGS, semop KEY,OPSTRING, setgrent, setpgrp PID,PGRP, +setpriority WHICH,WHO,PRIORITY, setpwent, setsockopt +SOCKET,LEVEL,OPTNAME,OPTVAL, shmctl ID,CMD,ARG, shmget KEY,SIZE,FLAGS, +shmread ID,VAR,POS,SIZE, shmwrite ID,STRING,POS,SIZE, socketpair +SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL, stat FILEHANDLE, stat EXPR, stat, +symlink OLDFILE,NEWFILE, syscall LIST, sysopen +FILEHANDLE,FILENAME,MODE,PERMS, system LIST, times, truncate +FILEHANDLE,LENGTH, truncate EXPR,LENGTH, umask EXPR, umask, utime LIST, +wait, waitpid PID,FLAGS =back -=item BUGS - -=over +=item CHANGES -=item Broken systems +v1.47, 22 March 2000, v1.46, 12 February 2000, v1.45, 20 December 1999, +v1.44, 19 July 1999, v1.43, 24 May 1999, v1.42, 22 May 1999, v1.41, 19 May +1999, v1.40, 11 April 1999, v1.39, 11 February 1999, v1.38, 31 December +1998, v1.37, 19 December 1998, v1.36, 9 September 1998, v1.35, 13 August +1998, v1.33, 06 August 1998, v1.32, 05 August 1998, v1.30, 03 August 1998, +v1.23, 10 July 1998 -=back +=item Supported Platforms =item SEE ALSO -=item HISTORY +=item AUTHORS / CONTRIBUTORS + +=item VERSION =back -=head2 perlunicode - Unicode support in Perl +=head2 perlsec - Perl security =over @@ -1893,21 +1973,18 @@ LC_NUMERIC, LC_TIME, LANG =over -=item Important Caveat +=item Laundering and Detecting Tainted Data -Input and Output Disciplines, Regular Expressions, C<use utf8> still needed -to enable a few features +=item Switches On the "#!" Line -=item Byte and Character semantics +=item Cleaning Up Your Path -=item Effects of character semantics +=item Security Bugs -=item Character encodings for input and output +=item Protecting Your Programs =back -=item CAVEATS - =item SEE ALSO =back @@ -2226,269 +2303,192 @@ LIST, READ this, LIST, READLINE this, GETC this, CLOSE this, DESTROY this =back -=head2 perlipc - Perl interprocess communication (signals, fifos, pipes, -safe subprocesses, sockets, and semaphores) +=head2 perlmod - Perl modules (packages and symbol tables) =over =item DESCRIPTION -=item Signals - -=item Named Pipes - -=over - -=item WARNING - -=back - -=item Using open() for IPC - =over -=item Filehandles - -=item Background Processes - -=item Complete Dissociation of Child from Parent - -=item Safe Pipe Opens - -=item Bidirectional Communication with Another Process - -=item Bidirectional Communication with Yourself - -=back - -=item Sockets: Client/Server Communication - -=over - -=item Internet Line Terminators - -=item Internet TCP Clients and Servers - -=item Unix-Domain TCP Clients and Servers - -=back - -=item TCP Clients with IO::Socket - -=over +=item Packages -=item A Simple Client +=item Symbol Tables -C<Proto>, C<PeerAddr>, C<PeerPort> +=item Package Constructors and Destructors -=item A Webget Client +=item Perl Classes -=item Interactive Client with IO::Socket +=item Perl Modules =back -=item TCP Servers with IO::Socket - -Proto, LocalPort, Listen, Reuse - -=item UDP: Message Passing - -=item SysV IPC - -=item NOTES - -=item BUGS - -=item AUTHOR - =item SEE ALSO =back -=head2 perlnumber - semantics of numbers and numeric operations in Perl +=head2 perlmodlib - constructing new Perl modules and finding existing ones =over -=item SYNOPSIS - =item DESCRIPTION -=item Storing numbers +=item THE PERL MODULE LIBRARY -=item Numeric operators and numeric conversions +=over -=item Flavors of Perl numeric operations +=item Pragmatic Modules -Arithmetic operators except, C<no integer>, Arithmetic operators except, -C<use integer>, Bitwise operators, C<no integer>, Bitwise operators, C<use -integer>, Operators which expect an integer, Operators which expect a -string +attributes, attrs, autouse, base, blib, bytes, charnames, constant, +diagnostics, fields, filetest, integer, less, locale, open, ops, overload, +re, sigtrap, strict, subs, utf8, vars, warnings -=item AUTHOR +=item Standard Modules -=item SEE ALSO +AnyDBM_File, AutoLoader, AutoSplit, B, B::Asmdata, B::Assembler, B::Bblock, +B::Bytecode, B::C, B::CC, B::Debug, B::Deparse, B::Disassembler, B::Lint, +B::Showlex, B::Stackobj, B::Terse, B::Xref, Benchmark, ByteLoader, CGI, +CGI::Apache, CGI::Carp, CGI::Cookie, CGI::Fast, CGI::Pretty, CGI::Push, +CGI::Switch, CPAN, CPAN::FirstTime, CPAN::Nox, Carp, Carp::Heavy, +Class::Struct, Cwd, DB, DB_File, Devel::SelfStubber, DirHandle, Dumpvalue, +English, Env, Exporter, Exporter::Heavy, ExtUtils::Command, +ExtUtils::Embed, ExtUtils::Install, ExtUtils::Installed, ExtUtils::Liblist, +ExtUtils::MM_Cygwin, ExtUtils::MM_OS2, ExtUtils::MM_Unix, ExtUtils::MM_VMS, +ExtUtils::MM_Win32, ExtUtils::MakeMaker, ExtUtils::Manifest, +ExtUtils::Mkbootstrap, ExtUtils::Mksymlists, ExtUtils::Packlist, +ExtUtils::testlib, Fatal, Fcntl, File::Basename, File::CheckTree, +File::Compare, File::Copy, File::DosGlob, File::Find, File::Path, +File::Spec, File::Spec::Functions, File::Spec::Mac, File::Spec::OS2, +File::Spec::Unix, File::Spec::VMS, File::Spec::Win32, File::Temp, +File::stat, FileCache, FileHandle, FindBin, Getopt::Long, Getopt::Std, +I18N::Collate, IO, IPC::Open2, IPC::Open3, Math::BigFloat, Math::BigInt, +Math::Complex, Math::Trig, NDBM_File, Net::Ping, Net::hostent, Net::netent, +Net::protoent, Net::servent, O, ODBM_File, Opcode, Pod::Checker, Pod::Find, +Pod::Html, Pod::InputObjects, Pod::LaTeX, Pod::Man, Pod::ParseUtils, +Pod::Parser, Pod::Plainer, Pod::Select, Pod::Text, Pod::Text::Color, +Pod::Text::Termcap, Pod::Usage, SDBM_File, Safe, Search::Dict, SelectSaver, +SelfLoader, Shell, Socket, Symbol, Term::ANSIColor, Term::Cap, +Term::Complete, Term::ReadLine, Test, Test::Harness, Text::Abbrev, +Text::ParseWords, Text::Soundex, Text::Wrap, Tie::Array, Tie::Handle, +Tie::Hash, Tie::RefHash, Tie::Scalar, Tie::SubstrHash, Time::Local, +Time::gmtime, Time::localtime, Time::tm, UNIVERSAL, User::grent, +User::pwent -=back +=item Extension Modules -=head2 perlfork - Perl's fork() emulation +=back -=over +=item CPAN -=item SYNOPSIS +Language Extensions and Documentation Tools, Development Support, Operating +System Interfaces, Networking, Device Control (modems) and InterProcess +Communication, Data Types and Data Type Utilities, Database Interfaces, +User Interfaces, Interfaces to / Emulations of Other Programming Languages, +File Names, File Systems and File Locking (see also File Handles), String +Processing, Language Text Processing, Parsing, and Searching, Option, +Argument, Parameter, and Configuration File Processing, +Internationalization and Locale, Authentication, Security, and Encryption, +World Wide Web, HTML, HTTP, CGI, MIME, Server and Daemon Utilities, +Archiving and Compression, Images, Pixmap and Bitmap Manipulation, Drawing, +and Graphing, Mail and Usenet News, Control Flow Utilities (callbacks and +exceptions etc), File Handle and Input/Output Stream Utilities, +Miscellaneous Modules, Africa, Asia, Australasia, Central America, Europe, +North America, South America -=item DESCRIPTION +=item Modules: Creation, Use, and Abuse =over -=item Behavior of other Perl features in forked pseudo-processes - -$$ or $PROCESS_ID, %ENV, chdir() and all other builtins that accept -filenames, wait() and waitpid(), kill(), exec(), exit(), Open handles to -files, directories and network sockets +=item Guidelines for Module Creation -=item Resource limits +Do similar modules already exist in some form?, Try to design the new +module to be easy to extend and reuse, Some simple style guidelines, Select +what to export, Select a name for the module, Have you got it right?, +README and other Additional Files, A description of the +module/package/extension etc, A copyright notice - see below, Prerequisites +- what else you may need to have, How to build it - possible changes to +Makefile.PL etc, How to install it, Recent changes in this release, +especially incompatibilities, Changes / enhancements you plan to make in +the future, Adding a Copyright Notice, Give the module a +version/issue/release number, How to release and distribute a module, Take +care when changing a released module -=item Killing the parent process +=item Guidelines for Converting Perl 4 Library Scripts into Modules -=item Lifetime of the parent process and pseudo-processes +There is no requirement to convert anything, Consider the implications, +Make the most of the opportunity, The pl2pm utility will get you started, +Adds the standard Module prologue lines, Converts package specifiers from ' +to ::, Converts die(...) to croak(...), Several other minor changes -=item CAVEATS AND LIMITATIONS +=item Guidelines for Reusing Application Code -BEGIN blocks, Open filehandles, Forking pipe open() not yet implemented, -Global state maintained by XSUBs, Interpreter embedded in larger -application, Thread-safety of extensions +Complete applications rarely belong in the Perl Module Library, Many +applications contain some Perl code that could be reused, Break-out the +reusable code into one or more separate module files, Take the opportunity +to reconsider and redesign the interfaces, In some cases the 'application' +can then be reduced to a small =back -=item BUGS - -=item AUTHOR - -=item SEE ALSO +=item NOTE =back -=head2 perlthrtut - tutorial on threads in Perl +=head2 perlmodinstall - Installing CPAN Modules =over =item DESCRIPTION -=item What Is A Thread Anyway? - -=item Threaded Program Models - =over -=item Boss/Worker - -=item Work Crew - -=item Pipeline - -=back - -=item Native threads - -=item What kind of threads are perl threads? - -=item Threadsafe Modules - -=item Thread Basics - -=over - -=item Basic Thread Support - -=item Creating Threads - -=item Giving up control - -=item Waiting For A Thread To Exit - -=item Errors In Threads +=item PREAMBLE -=item Ignoring A Thread +B<DECOMPRESS> the file, B<UNPACK> the file into a directory, B<BUILD> the +module (sometimes unnecessary), B<INSTALL> the module =back -=item Threads And Data - -=over - -=item Shared And Unshared Data - -=item Thread Pitfall: Races - -=item Controlling access: lock() +=item HEY -=item Thread Pitfall: Deadlocks +=item AUTHOR -=item Queues: Passing Data Around +=item COPYRIGHT =back -=item Threads And Code +=head2 perlnewmod - preparing a new module for distribution =over -=item Semaphores: Synchronizing Data Access - -Basic semaphores, Advanced Semaphores - -=item Attributes: Restricting Access To Subroutines - -=item Subroutine Locks - -=item Methods - -=item Locking A Subroutine - -=back - -=item General Thread Utility Routines +=item DESCRIPTION =over -=item What Thread Am I In? - -=item Thread IDs - -=item Are These Threads The Same? - -=item What Threads Are Running? - -=back +=item Warning -=item A Complete Example +=item What should I make into a module? -=item Conclusion +=item Step-by-step: Preparing the ground -=item Bibliography +Look around, Check it's new, Discuss the need, Choose a name, Check again -=over +=item Step-by-step: Making the module -=item Introductory Texts +Start with F<h2xs>, Use L<strict|strict> and L<warnings|warnings>, Use +L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!, Use L<plain old +documentation|perlpod>, Write tests, Write the README -=item OS-Related References +=item Step-by-step: Distributing your module -=item Other References +Get a CPAN user ID, C<perl Makefile.PL; make test; make dist>, Upload the +tarball, Announce to the modules list, Announce to clpa, Fix bugs! =back -=item Acknowledgements - =item AUTHOR -=item Copyrights - -=back - -=head2 perldiag - various Perl diagnostics - -=over - -=item DESCRIPTION +=item SEE ALSO =back @@ -4676,8 +4676,9 @@ probably be written as "%s", %s() called too early to check prototype, %s argument is not a HASH or ARRAY element, %s argument is not a HASH or ARRAY element or slice, %s argument is not a subroutine name, %s package attribute may clash with future reserved word: %s, (in cleanup) %s, <> -should be quotes, Attempt to join self, Bad evalled substitution pattern, -Bad realloc() ignored, Bareword found in conditional, Binary number > +should be quotes, Ambiguous range in transliteration operator, Attempt to +join self, Bad evalled substitution pattern, Bad realloc() ignored, +Bareword found in conditional, Binary number > 0b11111111111111111111111111111111 non-portable, Bit vector size > 32 non-portable, Buffer overflow in prime_env_iter: %s, Can't check filesystem of script "%s", Can't declare class for non-scalar %s in "%s", Can't @@ -4695,28 +4696,28 @@ explicit package name, Hexadecimal number > 0xffffffff non-portable, Ill-formed CRTL environ value "%s", Ill-formed message in prime_env_iter: |%s|, Illegal binary digit %s, Illegal binary digit %s ignored, Illegal number of bits in vec, Integer overflow in %s number, Invalid %s attribute: -%s, Invalid %s attributes: %s, invalid [] range "%s" in regexp, Invalid -separator character %s in attribute list, Invalid separator character %s in -subroutine attribute list, leaving effective %s failed, Lvalue subs -returning %s not implemented yet, Method %s not permitted, Missing -%sbrace%s on \N{}, Missing command in piped open, Missing name in "my sub", -No %s specified for -%c, No package name allowed for variable %s in "our", -No space allowed after -%c, no UTC offset information; assuming local time -is UTC, Octal number > 037777777777 non-portable, panic: del_backref, -panic: kid popen errno read, panic: magic_killbackrefs, Parentheses missing -around "%s" list, Possible Y2K bug: %s, pragma "attrs" is deprecated, use -"sub NAME : ATTRS" instead, Premature end of script headers, Repeat count -in pack overflows, Repeat count in unpack overflows, realloc() of freed -memory ignored, Reference is already weak, setpgrp can't take arguments, -Strange *+?{} on zero-length expression, switching effective %s is not -implemented, This Perl can't reset CRTL environ elements (%s), This Perl -can't set CRTL environ elements (%s=%s), Too late to run %s block, Unknown -open() mode '%s', Unknown process %x sent message to prime_env_iter: %s, -Unrecognized escape \\%c passed through, Unterminated attribute parameter -in attribute list, Unterminated attribute list, Unterminated attribute -parameter in subroutine attribute list, Unterminated subroutine attribute -list, Value of CLI symbol "%s" too long, Version number must be a constant -number +%s, Invalid %s attributes: %s, invalid [] range "%s" in regexp, invalid [] +range "%s" in transliteration operator, Invalid separator character %s in +attribute list, Invalid separator character %s in subroutine attribute +list, leaving effective %s failed, Lvalue subs returning %s not implemented +yet, Method %s not permitted, Missing %sbrace%s on \N{}, Missing command in +piped open, Missing name in "my sub", No %s specified for -%c, No package +name allowed for variable %s in "our", No space allowed after -%c, no UTC +offset information; assuming local time is UTC, Octal number > 037777777777 +non-portable, panic: del_backref, panic: kid popen errno read, panic: +magic_killbackrefs, Parentheses missing around "%s" list, Possible Y2K bug: +%s, pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead, Premature +end of script headers, Repeat count in pack overflows, Repeat count in +unpack overflows, realloc() of freed memory ignored, Reference is already +weak, setpgrp can't take arguments, Strange *+?{} on zero-length +expression, switching effective %s is not implemented, This Perl can't +reset CRTL environ elements (%s), This Perl can't set CRTL environ elements +(%s=%s), Too late to run %s block, Unknown open() mode '%s', Unknown +process %x sent message to prime_env_iter: %s, Unrecognized escape \\%c +passed through, Unterminated attribute parameter in attribute list, +Unterminated attribute list, Unterminated attribute parameter in subroutine +attribute list, Unterminated subroutine attribute list, Value of CLI symbol +"%s" too long, Version number must be a constant number =item New tests @@ -6078,6 +6079,47 @@ C<COND_WAIT>, F<os2.c> =back +=head2 perlposix-bc, README.posix-bc - building and installing Perl for +BS2000 POSIX. + +=over + +=item SYNOPSIS + +=item DESCRIPTION + +=over + +=item gzip + +=item bison + +=item Unpacking + +=item Compiling + +=item Testing + +=item Install + +=item Using Perl + +=back + +=item AUTHORS + +=item SEE ALSO + +=over + +=item Mailing list + +=back + +=item HISTORY + +=back + =head2 perlvms - VMS-specific documentation for Perl =over |