X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltoc.pod;h=6536974f8cacc13e7c0b732a6c60c42f0943650e;hb=d7d7d533fb289d8ec4fa1b5fb02f927ed0cb90cc;hp=19c1be2fcd106d0fb23e47e76c83a0e8a3521d57;hpb=d6b7ef8642dbff7f74dde11fd4995a37e8f38c04;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 19c1be2..6536974 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -1,4 +1,8 @@ +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# This file is autogenerated by buildtoc from all the other pods. +# Edit those files and run buildtoc --build-toc to effect changes. + =head1 NAME perltoc - perl documentation table of contents @@ -29,6 +33,8 @@ through to locate the proper section you're looking for. =item Miscellaneous +=item Language-Specific + =item Platform-Specific =back @@ -65,6 +71,8 @@ through to locate the proper section you're looking for. =item Running Perl programs +=item Safety net + =item Basic syntax overview =item Perl variable types @@ -101,274 +109,281 @@ Parentheses for capturing, Other regexp features =back -=head2 perlfaq - frequently asked questions about Perl ($Date: 2002/03/11 -21:32:23 $) +=head2 perlreftut - Mark's very short tutorial about references =over 4 =item DESCRIPTION -=over 4 +=item Who Needs Complicated Data Structures? -=item perlfaq: Structural overview of the FAQ. +=item The Solution -=item L: General Questions About Perl +=item Syntax -=item L: Obtaining and Learning about Perl +=over 4 -=item L: Programming Tools +=item Making References -=item L: Data Manipulation +=item Using References -=item L: Files and Formats +=item An Example -=item L: Regular Expressions +=item Arrow Rule -=item L: General Perl Language Issues +=back -=item L: System Interaction +=item Solution -=item L: Networking +=item The Rest -=back +=item Summary -=item About the perlfaq documents +=item Credits =over 4 -=item Where to get the perlfaq - -=item How to contribute to the perlfaq - -=item What will happen if you mail your Perl programming problems to the -authors +=item Distribution Conditions =back -=item Credits +=back -=item Author and Copyright Information +=head2 perldsc - Perl Data Structures Cookbook =over 4 -=item Bundled Distributions +=item DESCRIPTION -=item Disclaimer +arrays of arrays, hashes of arrays, arrays of hashes, hashes of hashes, +more elaborate constructs -=back +=item REFERENCES +X X X X -=item Changes +=item COMMON MISTAKES -1/November/2000, 23/May/99, 13/April/99, 7/January/99, 22/June/98, -24/April/97, 23/April/97, 25/March/97, 18/March/97, 17/March/97 Version, -Initial Release: 11/March/97 +=item CAVEAT ON PRECEDENCE +X X -=back +=item WHY YOU SHOULD ALWAYS C -=head2 perlbook - Perl book information +=item DEBUGGING +X X +X X X X +X X +X X -=over 4 +=item CODE EXAMPLES -=item DESCRIPTION +=item ARRAYS OF ARRAYS +X X -=back +=over 4 -=head2 perlsyn - Perl syntax +=item Declaration of an ARRAY OF ARRAYS -=over 4 +=item Generation of an ARRAY OF ARRAYS -=item DESCRIPTION +=item Access and Printing of an ARRAY OF ARRAYS -=over 4 +=back -=item Declarations +=item HASHES OF ARRAYS +X X -=item Simple statements +=over 4 -=item Compound statements +=item Declaration of a HASH OF ARRAYS -=item Loop Control +=item Generation of a HASH OF ARRAYS -=item For Loops +=item Access and Printing of a HASH OF ARRAYS -=item Foreach Loops +=back -=item Basic BLOCKs and Switch Statements +=item ARRAYS OF HASHES +X X -=item Goto +=over 4 -=item PODs: Embedded Documentation +=item Declaration of an ARRAY OF HASHES -=item Plain Old Comments (Not!) +=item Generation of an ARRAY OF HASHES -=back +=item Access and Printing of an ARRAY OF HASHES =back -=head2 perldata - Perl data types +=item HASHES OF HASHES +X X =over 4 -=item DESCRIPTION +=item Declaration of a HASH OF HASHES -=over 4 +=item Generation of a HASH OF HASHES -=item Variable names +=item Access and Printing of a HASH OF HASHES -=item Context +=back -=item Scalar values +=item MORE ELABORATE RECORDS +X X X -=item Scalar value constructors +=over 4 -=item List value constructors +=item Declaration of MORE ELABORATE RECORDS -=item Slices +=item Declaration of a HASH OF COMPLEX RECORDS -=item Typeglobs and Filehandles +=item Generation of a HASH OF COMPLEX RECORDS =back +=item Database Ties + =item SEE ALSO +=item AUTHOR + =back -=head2 perlop - Perl operators and precedence +=head2 perllol - Manipulating Arrays of Arrays in Perl =over 4 -=item SYNOPSIS - =item DESCRIPTION =over 4 -=item Terms and List Operators (Leftward) +=item Declaration and Access of Arrays of Arrays -=item The Arrow Operator +=item Growing Your Own -=item Auto-increment and Auto-decrement +=item Access and Printing -=item Exponentiation +=item Slices -=item Symbolic Unary Operators +=back -=item Binding Operators +=item SEE ALSO -=item Multiplicative Operators +=item AUTHOR -=item Additive Operators +=back -=item Shift Operators +=head2 perlrequick - Perl regular expressions quick start -=item Named Unary Operators +=over 4 -=item Relational Operators +=item DESCRIPTION -=item Equality Operators +=item The Guide -=item Bitwise And +=over 4 -=item Bitwise Or and Exclusive Or +=item Simple word matching -=item C-style Logical And +=item Using character classes -=item C-style Logical Or +=item Matching this or that -=item Range Operators +=item Grouping things and hierarchical matching -=item Conditional Operator +=item Extracting matches -=item Assignment Operators +=item Matching repetitions -=item Comma Operator +=item More matching -=item List Operators (Rightward) +=item Search and replace -=item Logical Not +=item The split operator -=item Logical And +=back -=item Logical or and Exclusive Or +=item BUGS -=item C Operators Missing From Perl +=item SEE ALSO -unary &, unary *, (TYPE) +=item AUTHOR AND COPYRIGHT -=item Quote and Quote-like Operators +=over 4 -=item Regexp Quote-Like Operators +=item Acknowledgments -?PATTERN?, m/PATTERN/cgimosx, /PATTERN/cgimosx, q/STRING/, C<'STRING'>, -qq/STRING/, "STRING", qr/STRING/imosx, qx/STRING/, `STRING`, qw/STRING/, -s/PATTERN/REPLACEMENT/egimosx, tr/SEARCHLIST/REPLACEMENTLIST/cds, -y/SEARCHLIST/REPLACEMENTLIST/cds, <, C, C, C, C, C<''>, C, C<"">, -C<``>, C, C, C<< >>, C, C, C, -C,, Interpolation of regular expressions, Optimization of -regular expressions +=head2 perlretut - Perl regular expressions tutorial -=item I/O Operators +=over 4 -=item Constant Folding +=item DESCRIPTION -=item Bitwise String Operators +=item Part 1: The basics -=item Integer Arithmetic +=over 4 -=item Floating-point Arithmetic +=item Simple word matching -=item Bigger Numbers +=item Using character classes -=back +=item Matching this or that + +=item Grouping things and hierarchical matching + +=item Extracting matches + +=item Matching repetitions + +=item Building a regexp + +=item Using regular expressions in Perl =back -=head2 perlsub - Perl subroutines +=item Part 2: Power tools =over 4 -=item SYNOPSIS +=item More on characters, strings, and character classes -=item DESCRIPTION +=item Compiling and saving regular expressions -=over 4 +=item Embedding comments and modifiers in a regular expression -=item Private Variables via my() +=item Non-capturing groupings -=item Persistent Private Variables +=item Looking ahead and looking behind -=item Temporary Values via local() +=item Using independent subexpressions to prevent backtracking -=item Lvalue subroutines +=item Conditional expressions -=item Passing Symbol Table Entries (typeglobs) +=item A bit of magic: executing Perl code in a regular expression -=item When to Still Use local() +=item Pragmas and debugging -=item Pass by Reference +=back -=item Prototypes +=item BUGS -=item Constant Functions +=item SEE ALSO -=item Overriding Built-in Functions +=item AUTHOR AND COPYRIGHT -=item Autoloading +=over 4 -=item Subroutine Attributes +=item Acknowledgments =back -=item SEE ALSO - =back -=head2 perlfunc - Perl builtin functions +=head2 perlboot - Beginner's Object-Oriented Tutorial =over 4 @@ -376,361 +391,271 @@ regular expressions =over 4 -=item Perl Functions by Category +=item If we could talk to the animals... -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 Introducing the method invocation arrow -=item Portability +=item Invoking a barnyard -=item Alphabetical Listing of Perl Functions +=item The extra parameter of method invocation -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, cos, 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 THING, log EXPR, log, -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,EXPR, open -FILEHANDLE,MODE,EXPR, open FILEHANDLE,MODE,EXPR,LIST, open -FILEHANDLE,MODE,REFERENCE, open FILEHANDLE, opendir DIRHANDLE,EXPR, ord -EXPR, ord, our EXPR, our EXPR : ATTRIBUTES, pack TEMPLATE,LIST, package -NAMESPACE, package, 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, sockatmark SOCKET, 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 Calling a second method to simplify things -=back +=item Inheriting the windpipes -=back +=item A few notes about @ISA -=head2 perlreftut - Mark's very short tutorial about references +=item Overriding the methods -=over 4 +=item Starting the search from a different place -=item DESCRIPTION +=item The SUPER way of doing things -=item Who Needs Complicated Data Structures? +=item Where we're at so far... -=item The Solution +=item A horse is a horse, of course of course -- or is it? -=item Syntax +=item Invoking an instance method -=over 4 - -=item Making References +=item Accessing the instance data -=item Using References +=item How to build a horse -=back +=item Inheriting the constructor -=item An Example +=item Making a method work with either classes or instances -=item Arrow Rule +=item Adding parameters to a method -=item Solution +=item More interesting instances -=item The Rest +=item A horse of a different color =item Summary -=item Credits - -=over 4 +=back -=item Distribution Conditions +=item SEE ALSO -=back +=item COPYRIGHT =back -=head2 perldsc - Perl Data Structures Cookbook +=head2 perltoot - Tom's object-oriented tutorial for perl =over 4 =item DESCRIPTION -arrays of arrays, hashes of arrays, arrays of hashes, hashes of hashes, -more elaborate constructs +=item Creating a Class -=item REFERENCES +=over 4 -=item COMMON MISTAKES +=item Object Representation -=item CAVEAT ON PRECEDENCE +=item Class Interface -=item WHY YOU SHOULD ALWAYS C +=item Constructors and Instance Methods -=item DEBUGGING +=item Planning for the Future: Better Constructors -=item CODE EXAMPLES +=item Destructors -=item ARRAYS OF ARRAYS +=item Other Object Methods + +=back + +=item Class Data =over 4 -=item Declaration of an ARRAY OF ARRAYS +=item Accessing Class Data -=item Generation of an ARRAY OF ARRAYS +=item Debugging Methods -=item Access and Printing of an ARRAY OF ARRAYS +=item Class Destructors + +=item Documenting the Interface =back -=item HASHES OF ARRAYS +=item Aggregation + +=item Inheritance =over 4 -=item Declaration of a HASH OF ARRAYS +=item Overridden Methods -=item Generation of a HASH OF ARRAYS +=item Multiple Inheritance -=item Access and Printing of a HASH OF ARRAYS +=item UNIVERSAL: The Root of All Objects =back -=item ARRAYS OF HASHES +=item Alternate Object Representations =over 4 -=item Declaration of an ARRAY OF HASHES - -=item Generation of an ARRAY OF HASHES +=item Arrays as Objects -=item Access and Printing of an ARRAY OF HASHES +=item Closures as Objects =back -=item HASHES OF HASHES +=item AUTOLOAD: Proxy Methods =over 4 -=item Declaration of a HASH OF HASHES - -=item Generation of a HASH OF HASHES +=item Autoloaded Data Methods -=item Access and Printing of a HASH OF HASHES +=item Inherited Autoloaded Data Methods =back -=item MORE ELABORATE RECORDS +=item Metaclassical Tools =over 4 -=item Declaration of MORE ELABORATE RECORDS - -=item Declaration of a HASH OF COMPLEX RECORDS +=item Class::Struct -=item Generation of a HASH OF COMPLEX RECORDS +=item Data Members as Variables =back -=item Database Ties +=item NOTES + +=over 4 + +=item Object Terminology + +=back =item SEE ALSO -=item AUTHOR +=item AUTHOR AND COPYRIGHT + +=item COPYRIGHT + +=over 4 + +=item Acknowledgments =back -=head2 perlrequick - Perl regular expressions quick start +=back + +=head2 perltooc - Tom's OO Tutorial for Class Data in Perl =over 4 =item DESCRIPTION -=item The Guide +=item Class Data in a Can + +=item Class Data as Package Variables =over 4 -=item Simple word matching +=item Putting All Your Eggs in One Basket -=item Using character classes +=item Inheritance Concerns -=item Matching this or that +=item The Eponymous Meta-Object -=item Grouping things and hierarchical matching +=item Indirect References to Class Data -=item Extracting matches +=item Monadic Classes -=item Matching repetitions +=item Translucent Attributes -=item More matching +=back -=item Search and replace +=item Class Data as Lexical Variables -=item The split operator +=over 4 + +=item Privacy and Responsibility + +=item File-Scoped Lexicals + +=item More Inheritance Concerns + +=item Locking the Door and Throwing Away the Key + +=item Translucency Revisited =back -=item BUGS +=item NOTES =item SEE ALSO =item AUTHOR AND COPYRIGHT -=over 4 - -=item Acknowledgments +=item ACKNOWLEDGEMENTS -=back +=item HISTORY =back -=head2 perlpod - the Plain Old Documentation format +=head2 perlbot - Bag'o Object Tricks (the BOT) =over 4 =item DESCRIPTION -=over 4 +=item OO SCALING TIPS -=item Ordinary Paragraph +=item INSTANCE VARIABLES -=item Verbatim Paragraph +=item SCALAR INSTANCE VARIABLES -=item Command Paragraph +=item INSTANCE VARIABLE INHERITANCE -C<=head1 I>, C<=head2 I>, C<=head3 I>, C<=head4 I>, C<=over I>, C<=item -I>, C<=back>, C<=cut>, C<=pod>, C<=begin I>, C<=end -I>, C<=for I I> +=item OBJECT RELATIONSHIPS -=item Formatting Codes +=item OVERRIDING SUPERCLASS METHODS -CtextE> -- italic text, CtextE> -- bold text, -CcodeE> -- code text, CnameE> -- a hyperlink, -CescapeE> -- a character escape, CfilenameE> -- used -for filenames, CtextE> -- text contains non-breaking spaces, -Ctopic nameE> -- an index entry, CE> -- a null -(zero-effect) formatting code +=item USING RELATIONSHIP WITH SDBM -=item The Intent +=item THINKING OF CODE REUSE -=item Embedding Pods in Perl Modules +=item CLASS CONTEXT AND THE OBJECT -=item Hints for Writing Pod +=item INHERITING A CONSTRUCTOR -=back +=item DELEGATION =item SEE ALSO -=item AUTHOR - =back -=head2 perlpodspec - Plain Old Documentation: format specification and -notes +=head2 perlstyle - Perl style guide =over 4 =item DESCRIPTION -=item Pod Definitions - -=item Pod Commands - -"=head1", "=head2", "=head3", "=head4", "=pod", "=cut", "=over", "=item", -"=back", "=begin formatname", "=end formatname", "=for formatname text..." - -=item Pod Formatting Codes - -CtextE> -- italic text, CtextE> -- bold text, -CcodeE> -- code text, CfilenameE> -- style for -filenames, Ctopic nameE> -- an index entry, CE> -- a -null (zero-effect) formatting code, CnameE> -- a hyperlink, -CescapeE> -- a character escape, CtextE> -- text -contains non-breaking spaces - -=item Notes on Implementing Pod Processors - -=item About LE...E Codes +=back -First:, Second:, Third:, Fourth:, Fifth:, Sixth: +=head2 perlcheat - Perl 5 Cheat Sheet -=item About =over...=back Regions +=over 4 -=item About Data Paragraphs and "=begin/=end" Regions +=item DESCRIPTION -=item SEE ALSO +=over 4 -=item AUTHOR +=item The sheet =back -=head2 perlstyle - Perl style guide +=item ACKNOWLEDGEMENTS -=over 4 +=item AUTHOR -=item DESCRIPTION +=item SEE ALSO =back @@ -744,7 +669,7 @@ First:, Second:, Third:, Fourth:, Fifth:, Sixth: =item Awk Traps -=item C Traps +=item C/C++ Traps =item Sed Traps @@ -761,54 +686,84 @@ 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 +Symbols starting with "_" no longer forced into main, Double-colon valid +package separator in variable name, 2nd and 3rd args to C are now +in scalar context, Can't do C into a block that is optimized away, +Can't use whitespace as variable name or quote delimiter, C gone, C<**> binds tighter than unary minus, C changed when +iterating over a list, C with no args behavior changed, B<-e> +behavior fixed, C returns number of elements in resulting list, Some +error messages differ, C honors subroutine args, Bugs removed =item Parsing Traps -Parsing, Parsing, Parsing, Parsing, Parsing +Space between . and = triggers syntax error, Better parsing in perl 5, +Function parsing, String interpolation of C<$#array> differs, Perl guesses +on C, C followed by C<{> if it starts BLOCK or hash ref =item Numerical Traps -Numerical, Numerical, Numerical, Bitwise string ops +Formatted output and significant digits, Auto-increment operator over +signed int limit deleted, Assignment of return values from numeric equality +tests doesn't work, Bitwise string ops =item General data type traps -(Arrays), (Arrays), (Hashes), (Globs), (Globs), (Scalar String), -(Constants), (Scalars), (Variable Suicide) +Negative array subscripts now count from the end of array, Setting +C<$#array> lower now discards array elements, Hashes get defined before +use, Glob assignment from localized variable to variable, Assigning +C to glob, Changes in unary negation (of strings), Modifying of +constants prohibited, C behavior changed, Variable Suicide =item Context Traps - scalar, list contexts -(list context), (scalar context), (scalar context), (list, builtin) +Elements of argument lists for formats evaluated in list context, +C returns false value in scalar context if no caller present, +Comma operator in scalar context gives scalar context to args, C +prototyped as C<($;@)> =item Precedence Traps -Precedence, Precedence, Precedence, Precedence, Precedence, Precedence, -Precedence +LHS vs. RHS of any assignment operator, Semantic errors introduced due to +precedence, Precedence of assignment operators same as the precedence of +assignment, C requires parentheses around filehandle, C<$:> +precedence over C<$::> gone, Precedence of file test operators documented, +C, C, C are regular named unary operators =item General Regular Expression Traps using s///, etc. -Regular Expression, Regular Expression, Regular Expression, Regular -Expression, Regular Expression, Regular Expression, Regular Expression, -Regular Expression +C interpolates on either side, C attaches its state to +the searched string, C used within an anonymous sub, C<$+> isn't set +to whole match, Substitution now returns null string if it fails, +C is now a normal substitution, Stricter parsing of variables +in regular expressions, C matches only once, Failed matches don't +reset the match variables =item Subroutine, Signal, Sorting Traps -(Signals), (Sort Subroutine), warn() won't let you specify a filehandle +Barewords that used to look like strings look like subroutine calls, +Reverse is no longer allowed as the name of a sort subroutine, C +won't let you specify a filehandle =item OS Traps -(SysV), (SysV) +SysV resets signal handler correctly, SysV C appends correctly =item Interpolation Traps -Interpolation, Interpolation, Interpolation, Interpolation, Interpolation, -Interpolation, Interpolation, Interpolation, Interpolation +C<@> always interpolates an array in double-quotish strings, Double-quoted +strings may no longer end with an unescaped $, Arbitrary expressions are +evaluated inside braces within double quotes, C<$$x> now tries to +dereference $x, Creation of hashes on the fly with C requires +protection, Bugs in earlier perl versions, Array and hash brackets during +interpolation, Interpolation of C<\$$foo{bar}>, C string passed to +C will not find string terminator =item DBM Traps -DBM, DBM +Perl5 must have been linked with same dbm/ndbm as the default for +C, DBM exceeding limit on the key/value size will cause perl5 to +exit immediately =item Unclassified Traps @@ -819,351 +774,41 @@ LIMIT specified =back -=head2 perlrun - how to execute the Perl interpreter +=head2 perldebtut - Perl debugging tutorial =over 4 -=item SYNOPSIS - =item DESCRIPTION -=over 4 +=item use strict -=item #! and quoting on non-Unix systems +=item Looking at data and -w and v -OS/2, MS-DOS, Win95/NT, Macintosh, VMS +=item help -=item Location of Perl +=item Stepping through code -=item Command Switches +=item Placeholder for a, w, t, T + +=item REGULAR EXPRESSIONS -B<-0>[I], B<-a>, B<-C>, B<-c>, B<-d>, B<-d:>I, -B<-D>I, B<-D>I, B<-e> I, B<-F>I, -B<-h>, B<-i>[I], B<-I>I, B<-l>[I], -B<-m>[B<->]I, B<-M>[B<->]I, B<-M>[B<->]I<'module ...'>, -B<-[mM]>[B<->]I, B<-n>, B<-p>, B<-P>, B<-s>, B<-S>, -B<-t>, B<-T>, B<-u>, B<-U>, B<-v>, B<-V>, B<-V:>I, B<-w>, B<-W>, -B<-X>, B<-x> I +=item OUTPUT TIPS -=back +=item CGI -=item ENVIRONMENT +=item GUIs + +=item SUMMARY -HOME, LOGDIR, PATH, PERL5LIB, PERL5OPT, PERLLIB, PERL5DB, PERL5SHELL -(specific to the Win32 port), PERL_DEBUG_MSTATS, PERL_DESTRUCT_LEVEL, -PERL_ENCODING, PERL_ROOT (specific to the VMS port), SYS$LOGIN (specific to -the VMS port) - -=item DESCRIPTION - -accept() on closed socket %s, Allocation too large: %lx, '!' allowed only -after types %s, Ambiguous call resolved as CORE::%s(), qualify as such or -use &, Ambiguous range in transliteration operator, Ambiguous use of %s -resolved as %s, '|' and '<' may not both be specified on command line, '|' -and '>' may not both be specified on command line, Applying %s to %s will -act on scalar(%s), Args must match #! line, Arg too short for msgsnd, %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, Argument "%s" isn't -numeric%s, Array @%s missing the @ in argument %d of %s(), assertion -botched: %s, Assertion failed: file "%s", Assignment to both a list and a -scalar, Attempt to access disallowed key '%s' in a fixed hash, Attempt to -clear a fixed hash, Attempt to delete readonly key '%s' from a fixed hash, -Attempt to delete disallowed key '%s' from a fixed hash, Attempt to bless -into a reference, Attempt to free non-arena SV: 0x%lx, Attempt to free -nonexistent shared string, Attempt to free temp prematurely, Attempt to -free unreferenced glob pointers, Attempt to free unreferenced scalar, -Attempt to join self, Attempt to pack pointer to temporary value, Attempt -to use reference as lvalue in substr, Bad arg length for %s, is %d, should -be %s, Bad evalled substitution pattern, Bad filehandle: %s, Bad free() -ignored, Bad hash, Bad index while coercing array into hash, Badly placed -()'s, Bad name after %s::, Bad realloc() ignored, Bad symbol for array, Bad -symbol for filehandle, Bad symbol for hash, Bareword found in conditional, -Bareword "%s" not allowed while "strict subs" in use, Bareword "%s" refers -to nonexistent package, BEGIN failed--compilation aborted, BEGIN not safe -after errors--compilation aborted, \1 better written as $1, Binary number > -0b11111111111111111111111111111111 non-portable, bind() on closed socket -%s, binmode() on closed filehandle %s, Bit vector size > 32 non-portable, -Bizarre copy of %s in %s, B<-P> not allowed for setuid/setgid script, -Buffer overflow in prime_env_iter: %s, Callback called exit, %s() called -too early to check prototype, / cannot take a count, Can't bless -non-reference value, Can't call method "%s" in empty package "%s", Can't -call method "%s" on an undefined value, Can't call method "%s" on unblessed -reference, Can't call method "%s" without a package or object reference, -Can't chdir to %s, Can't check filesystem of script "%s" for nosuid, Can't -coerce array into hash, Can't coerce %s to integer in %s, Can't coerce %s -to number in %s, Can't coerce %s to string in %s, Can't create pipe -mailbox, Can't declare class for non-scalar %s in "%s", Can't declare %s in -"%s", Can't do inplace edit: %s is not a regular file, Can't do inplace -edit on %s: %s, Can't do inplace edit without backup, Can't do inplace -edit: %s would not be unique, Can't do {n,m} with n > m in regex; marked by -<-- HERE in m/%s/, Can't do setegid!, Can't do seteuid!, Can't do setuid, -Can't do waitpid with flags, Can't emulate -%s on #! line, Can't exec "%s": -%s, Can't exec %s, Can't execute %s, Can't find an opnumber for "%s", Can't -find %s character property "%s", Can't find label %s, Can't find %s on -PATH, Can't find %s on PATH, '.' not in PATH, Can't find string terminator -%s anywhere before EOF, Can't find %s property definition %s, Can't fork, -Can't get filespec - stale stat buffer?, Can't get pipe mailbox device -name, Can't get SYSGEN parameter value for MAXBUF, Can't "goto" into the -middle of a foreach loop, Can't "goto" out of a pseudo block, Can't goto -subroutine from an eval-string, Can't goto subroutine outside a subroutine, -Can't ignore signal CHLD, forcing to default, Can't "last" outside a loop -block, Can't localize lexical variable %s, Can't localize pseudo-hash -element, Can't localize through a reference, Can't locate file %s, Can't -locate auto/%s.al in @INC, Can't locate object method "%s" via package -"%s", (perhaps you forgot to load "%s"?), Can't locate package %s for -@%s::ISA, Can't make list assignment to \%ENV on this system, Can't modify -%s in %s, Can't modify nonexistent substring, Can't modify non-lvalue -subroutine call, Can't msgrcv to read-only var, Can't "next" outside a loop -block, Can't open %s: %s, Can't open bidirectional pipe, Can't open error -file %s as stderr, Can't open input file %s as stdin, Can't open output -file %s as stdout, Can't open output pipe (name: %s), Can't open perl -script%s: %s, Can't read CRTL environ, Can't redefine active sort -subroutine %s, Can't "redo" outside a loop block, Can't remove %s: %s, -skipping file, Can't rename %s to %s: %s, skipping file, Can't reopen input -pipe (name: %s) in binary mode, Can't resolve method `%s' overloading `%s' -in package `%s', Can't reswap uid and euid, Can't return %s from lvalue -subroutine, Can't return %s to lvalue scalar context, Can't return outside -a subroutine, Can't stat script "%s", Can't swap uid and euid, Can't take -log of %g, Can't take sqrt of %g, Can't undef active subroutine, Can't -unshift, Can't upgrade that kind of scalar, Can't upgrade to undef, Can't -use an undefined value as %s reference, Can't use anonymous symbol table -for method lookup, Can't use bareword ("%s") as %s ref while "strict refs" -in use, Can't use %! because Errno.pm is not available, Can't use %s for -loop variable, Can't use global %s in "my", Can't use "my %s" in sort -comparison, Can't use %s ref as %s ref, Can't use string ("%s") as %s ref -while "strict refs" in use, Can't use subscript on %s, Can't use \%c to -mean $%c in expression, Can't weaken a nonreference, Can't x= to read-only -value, Character in "C" format wrapped, Character in "c" format wrapped, -close() on unopened filehandle %s, %s: Command not found, Compilation -failed in require, Complex regular subexpression recursion limit (%d) -exceeded, connect() on closed socket %s, Constant(%s)%s: %s, Constant is -not %s reference, Constant subroutine %s redefined, Constant subroutine %s -undefined, Copy method did not return a reference, CORE::%s is not a -keyword, corrupted regexp pointers, corrupted regexp program, Corrupt -malloc ptr 0x%lx at 0x%lx, C<-p> destination: %s, C<-T> and C<-B> not -implemented on filehandles, Deep recursion on subroutine "%s", -defined(@array) is deprecated, defined(%hash) is deprecated, %s defines -neither package nor VERSION--version check failed, Delimiter for here -document is too long, Did not produce a valid header, %s did not return a -true value, (Did you mean &%s instead?), (Did you mean "local" instead of -"our"?), (Did you mean $ or @ instead of %?), Died, Document contains no -data, %s does not define %s::VERSION--version check failed, Don't know how -to handle magic of type '%s', do_study: out of memory, (Do you need to -predeclare %s?), dump() better written as CORE::dump(), Duplicate free() -ignored, elseif should be elsif, Empty %s, entering effective %s failed, -Error converting file specification %s, %s: Eval-group in insecure regular -expression, %s: Eval-group not allowed at run time, %s: Eval-group not -allowed, use re 'eval', Excessively long <> operator, exec? I'm not *that* -kind of operating system, Execution of %s aborted due to compilation -errors, Exiting eval via %s, Exiting format via %s, Exiting pseudo-block -via %s, Exiting subroutine via %s, Exiting substitution via %s, Explicit -blessing to '' (assuming package main), %s: Expression syntax, %s -failed--call queue aborted, False [] range "%s" in regex; marked by <-- -HERE in m/%s/, Fatal VMS error at %s, line %d, fcntl is not implemented, -Filehandle %s opened only for input, Filehandle %s opened only for output, -Final $ should be \$ or $name, Final @ should be \@ or @name, flock() on -closed filehandle %s, Quantifier follows nothing in regex;, Format not -terminated, Format %s redefined, Found = in conditional, should be ==, %s -found where operator expected, gdbm store returned %d, errno %d, key "%s", -gethostent not implemented, get%sname() on closed socket %s, getpwnam -returned invalid UIC %#o for user "%s", getsockopt() on closed socket %s, -Global symbol "%s" requires explicit package name, glob failed (%s), Glob -not terminated, Got an error from DosAllocMem, goto must have label, -%s-group starts with a count, %s had compilation errors, Had to create %s -unexpectedly, Hash %%s missing the % in argument %d of %s(), %s has too -many errors, Hexadecimal number > 0xffffffff non-portable, Identifier too -long, Illegal binary digit %s, Illegal binary digit %s ignored, Illegal -character %s (carriage return), Illegal character in prototype for %s : %s, -Illegal division by zero, Illegal hexadecimal digit %s ignored, Illegal -modulus zero, Illegal number of bits in vec, Illegal octal digit %s, -Illegal octal digit %s ignored, Illegal switch in PERL5OPT: %s, Ill-formed -CRTL environ value "%s", Ill-formed message in prime_env_iter: |%s|, (in -cleanup) %s, In EBCDIC the v-string components cannot exceed 2147483647, -Insecure dependency in %s, Insecure directory in %s, Insecure $ENV{%s} -while running %s, Integer overflow in %s number, Internal disaster in -regex; marked by <-- HERE in m/%s/, Internal inconsistency in tracking -vforks, Internal urp in regex; marked by <-- HERE in m/%s/, %s (...) -interpreted as function, Invalid %s attribute: %s, Invalid %s attributes: -%s, Invalid conversion in %s: "%s", Invalid [] range "%s" in regex; marked -by <-- HERE in m/%s/, Invalid [] range "%s" in transliteration operator, -Invalid separator character %s in attribute list, Invalid type in pack: -'%s', Invalid type in unpack: '%s', ioctl is not implemented, ioctl() on -unopened %s, IO::Socket::atmark not implemented on this architecture, `%s' -is not a code reference, `%s' is not an overloadable type, junk on end of -regexp, Label not found for "last %s", Label not found for "next %s", Label -not found for "redo %s", leaving effective %s failed, listen() on closed -socket %s, lstat() on filehandle %s, Lvalue subs returning %s not -implemented yet, Lookbehind longer than %d not implemented in regex;, -Malformed PERLLIB_PREFIX, Malformed prototype for %s: %s, Malformed UTF-8 -character (%s), Malformed UTF-16 surrogate, %s matches null string many -times in regex;, "%s" may clash with future reserved word, % may only be -used in unpack, Method for operation %s not found in package %s during -blessing, Method %s not permitted, Might be a runaway multi-line %s string -starting on line %d, Misplaced _ in number, Missing %sbrace%s on \N{}, -Missing comma after first argument to %s function, Missing command in piped -open, Missing name in "my sub", Missing $ on loop variable, (Missing -operator before %s?), Missing right brace on %s, Missing right curly or -square bracket, (Missing semicolon on previous line?), Modification of a -read-only value attempted, Modification of non-creatable array value -attempted, %s, Modification of non-creatable hash value attempted, %s, -Module name must be constant, Module name required with -%c option, More -than one argument to open, msg%s not implemented, Multidimensional syntax -%s not supported, / must be followed by a*, A* or Z*, / must be followed by -a, A or Z, / must follow a numeric type, "my sub" not yet implemented, "my" -variable %s can't be in a package, Name "%s::%s" used only once: possible -typo, Negative length, Negative offset to vec in lvalue context, Nested -quantifiers in regex; marked by <-- HERE in m/%s/, %s never introduced, No -%s allowed while running setuid, No B<-e> allowed in setuid scripts, No -comma allowed after %s, No command into which to pipe on command line, No -DB::DB routine defined, No dbm on this machine, No DBsub routine, No error -file after 2> or 2>> on command line, No input file after < on command -line, No #! line, "no" not allowed in expression, No output file after > on -command line, No output file after > or >> on command line, No package name -allowed for variable %s in "our", No Perl script found in input, No -setregid available, No setreuid available, No space allowed after -%c, No -%s specified for -%c, No such class %s, No such pipe open, No such -pseudo-hash field "%s", No such pseudo-hash field "%s" in variable %s of -type %s, No such signal: SIG%s, Not a CODE reference, Not a format -reference, Not a GLOB reference, Not a HASH reference, Not an ARRAY -reference, Not a perl script, Not a SCALAR reference, Not a subroutine -reference, Not a subroutine reference in overload table, Not enough -arguments for %s, Not enough format arguments, %s: not found, %s not -allowed in length fields, no UTC offset information; assuming local time is -UTC, Null filename used, NULL OP IN RUN, Null picture in formline, Null -realloc, NULL regexp argument, NULL regexp parameter, Number too long, -Octal number in vector unsupported, Octal number > 037777777777 -non-portable, Odd number of arguments for overload::constant, Odd number of -elements in anonymous hash, Odd number of elements in hash assignment, -Offset outside string, -%s on unopened filehandle %s, %s() on unopened %s, -oops: oopsAV, oops: oopsHV, Operation `%s': no method found, %s, Operator -or semicolon missing before %s, "our" variable %s redeclared, Out of -memory!, Out of memory during "large" request for %s, Out of memory during -request for %s, Out of memory during ridiculously large request, Out of -memory for yacc stack, @ outside of string, %s package attribute may clash -with future reserved word: %s, page overflow, panic: %s, panic: ck_grep, -panic: ck_split, panic: corrupt saved stack index, panic: del_backref, -panic: die %s, panic: pp_match%s, panic: do_subst, panic: do_trans_%s, -panic: frexp, panic: goto, panic: INTERPCASEMOD, panic: INTERPCONCAT, -panic: kid popen errno read, panic: last, panic: leave_scope clearsv, -panic: leave_scope inconsistency, panic: magic_killbackrefs, panic: malloc, -panic: mapstart, panic: null array, panic: pad_alloc, panic: pad_free -curpad, panic: pad_free po, panic: pad_reset curpad, panic: pad_sv po, -panic: pad_swipe curpad, panic: pad_swipe po, panic: pp_iter, panic: -pp_split, panic: realloc, panic: restartop, panic: return, panic: scan_num, -panic: sv_insert, panic: top_env, panic: yylex, panic: utf16_to_utf8: odd -bytelen, Parentheses missing around "%s" list, Perl %s required--this is -only version %s, stopped, PERL_SH_DIR too long, perl: warning: Setting -locale failed, perlio: argument list not closed for layer "%s", perlio: -invalid separator character %s in attribute list, perlio: unknown layer -"%s", Permission denied, pid %x not a child, P must have an explicit size, -POSIX syntax [%s] belongs inside character classes in regex;, POSIX syntax -[. .] is reserved for future extensions in regex;, POSIX syntax [= =] is -reserved for future extensions in regex;, POSIX class [:%s:] unknown in -regex;, POSIX getpgrp can't take an argument, Possible attempt to put -comments in qw() list, Possible attempt to separate words with commas, -Possible memory corruption: %s overflowed 3rd argument, Possible unintended -interpolation of %s in string, Possible Y2K bug: %s, pragma "attrs" is -deprecated, use "sub NAME : ATTRS" instead, Precedence problem: open %s -should be open(%s), Premature end of script headers, printf() on closed -filehandle %s, print() on closed filehandle %s, Process terminated by -SIG%s, Prototype mismatch: %s vs %s, Prototype not terminated, Quantifier -in {,} bigger than %d in regex;, Quantifier unexpected on zero-length -expression;, Range iterator outside integer range, readline() on closed -filehandle %s, Reallocation too large: %lx, realloc() of freed memory -ignored, Recompile perl with B<-D>DEBUGGING to use B<-D> switch, Recursive -inheritance detected in package '%s', Recursive inheritance detected while -looking for method %s, Reference found where even-sized list expected, -Reference is already weak, Reference miscount in sv_replace(), Reference to -nonexistent group in regex;, regexp memory corruption, Regexp out of space, -Repeat count in pack overflows, Repeat count in unpack overflows, Reversed -%s= operator, Runaway format, Scalar value @%s[%s] better written as -$%s[%s], Scalar value @%s{%s} better written as $%s{%s}, Scalars leaked: -%d, Script is not setuid/setgid in suidperl, Search pattern not terminated, -%sseek() on unopened filehandle, select not implemented, Self-ties of -arrays and hashes are not supported, Semicolon seems to be missing, -semi-panic: attempt to dup freed string, sem%s not implemented, send() on -closed socket %s, Sequence (? incomplete in regex; marked by <-- HERE in -m/%s/, Sequence (?{...}) not terminated or not {}-balanced in regex;, -Sequence (?%s...) not implemented in regex;, Sequence (?%s...) not -recognized in regex;, Sequence (?#... not terminated in regex;, 500 Server -error, Server error, setegid() not implemented, seteuid() not implemented, -setpgrp can't take arguments, setrgid() not implemented, setruid() not -implemented, setsockopt() on closed socket %s, Setuid/gid script is -writable by world, shm%s not implemented, <> should be quotes, /%s/ should -probably be written as "%s", shutdown() on closed socket %s, SIG%s handler -"%s" not defined, sort is now a reserved word, Sort subroutine didn't -return a numeric value, Sort subroutine didn't return single value, -splice() offset past end of array, Split loop, Statement unlikely to be -reached, stat() on unopened filehandle %s, Stub found while resolving -method `%s' overloading %s, Subroutine %s redefined, Substitution loop, -Substitution pattern not terminated, Substitution replacement not -terminated, substr outside of string, suidperl is no longer needed since -%s, Switch (?(condition)... contains too many branches in regex;, Switch -condition not recognized in regex;, switching effective %s is not -implemented, syntax error, syntax error at line %d: `%s' unexpected, syntax -error in file %s at line %d, next 2 tokens "%s", %s syntax OK, System V %s -is not implemented on this machine, syswrite() on closed filehandle %s, -Target of goto is too deeply nested, tell() on unopened filehandle, That -use of $[ is unsupported, The crypt() function is unimplemented due to -excessive paranoia, The %s function is unimplemented, The stat preceding %s -wasn't an lstat, This Perl can't reset CRTL environ elements (%s), This -Perl can't set CRTL environ elements (%s=%s), times not implemented, Too -few args to syscall, Too late for "B<-T>" option, Too late for "-%s" -option, Too late to run %s block, Too many args to syscall, Too many -arguments for %s, Too many )'s, Too many ('s, Trailing \ in regex m/%s/, -Transliteration pattern not terminated, Transliteration replacement not -terminated, truncate not implemented, Type of arg %d to %s must be %s (not -%s), umask not implemented, Unable to create sub named "%s", Unbalanced -context: %d more PUSHes than POPs, Unbalanced saves: %d more saves than -restores, Unbalanced scopes: %d more ENTERs than LEAVEs, Unbalanced tmps: -%d more allocs than frees, Undefined format "%s" called, Undefined sort -subroutine "%s" called, Undefined subroutine &%s called, Undefined -subroutine called, Undefined subroutine in sort, Undefined top format "%s" -called, Undefined value assigned to typeglob, %s: Undefined variable, -unexec of %s into %s failed!, Unicode character %s is illegal, Unknown -BYTEORDER, Unknown "re" subpragma '%s' (known ones are: %s), Unknown switch -condition (?(%.2s in regex;, Unknown open() mode '%s', Unknown process %x -sent message to prime_env_iter: %s, Unknown warnings category '%s', -unmatched [ in regex; marked by <-- HERE in m/%s/, unmatched ( in regex; -marked by <-- HERE in m/%s/, Unmatched right %s bracket, Unquoted string -"%s" may clash with future reserved word, Unrecognized character %s, /%s/: -Unrecognized escape \\%c in character class passed through, Unrecognized -escape \\%c passed through in regex;, Unrecognized escape \\%c passed -through, Unrecognized signal name "%s", Unrecognized switch: -%s (-h will -show valid options), Unsuccessful %s on filename containing newline, -Unsupported directory function "%s" called, Unsupported function %s, -Unsupported function fork, Unsupported script encoding, Unsupported socket -function "%s" called, Unterminated attribute list, Unterminated attribute -parameter in attribute list, Unterminated compressed integer, Unterminated -<> operator, untie attempted while %d inner references still exist, Useless -(?%s) - use /%s modifier in regex;, Useless (?-%s) - don't use /%s modifier -in regex;, Useless use of %s in void context, Useless use of "re" pragma, -Useless use of sort in scalar context, Useless use of %s with no values, -"use" not allowed in expression, Use of bare << to mean <<"" is deprecated, -Use of *glob{FILEHANDLE} is deprecated, Use of chdir('') or chdir(undef) as -chdir() deprecated, Use of implicit split to @_ is deprecated, Use of -inherited AUTOLOAD for non-method %s() is deprecated, Use of -l on -filehandle %s, Use of "package" with no arguments is deprecated, Use of %s -in printf format not supported, Use of $* is deprecated, Use of %s is -deprecated, Use of $# is deprecated, Use of reference "%s" as array index, -Use of reserved word "%s" is deprecated, Use of tainted arguments in %s is -deprecated, Use of uninitialized value%s, Using a hash as a reference is -deprecated, Using an array as a reference is deprecated, UTF-16 surrogate -%s, Value of %s can be "0"; test with defined(), Value of CLI symbol "%s" -too long, Variable "%s" is not imported%s, "%s" variable %s masks earlier -declaration in same %s, Variable "%s" may be unavailable, Variable syntax, -Variable "%s" will not stay shared, Variable length lookbehind not -implemented in regex;, Version number must be a constant number, v-string -in use/require is non-portable, Warning: something's wrong, Warning: unable -to close filehandle %s properly, Warning: Use of "%s" without parentheses -is ambiguous, Wide character in %s, write() on closed filehandle %s, X -outside of string, x outside of string, Xsub "%s" called in sort, Xsub -called in sort, YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!, You -need to quote "%s" +=item SEE ALSO + +=item AUTHOR + +=item CONTRIBUTORS =back -=head2 perllexwarn - Perl Lexical Warnings +=head2 perlfaq - frequently asked questions about Perl ($Revision: 3606 $) =over 4 @@ -1171,127 +816,106 @@ need to quote "%s" =over 4 -=item Default Warnings and Optional Warnings +=item Where to get the perlfaq -=item What's wrong with B<-w> and C<$^W> +=item How to contribute to the perlfaq -=item Controlling Warnings from the Command Line +=item What will happen if you mail your Perl programming problems to the +authors? -B<-w>, B<-W>, B<-X> +=back -=item Backward Compatibility +=item CREDITS -=item Category Hierarchy +=item AUTHOR AND COPYRIGHT -=item Fatal Warnings +=item Table of Contents -=item Reporting Warnings from a Module +perlfaq - this document, perlfaq1 - General Questions About Perl, perlfaq2 +- Obtaining and Learning about Perl, perlfaq3 - Programming Tools, perlfaq4 +- Data Manipulation, perlfaq5 - Files and Formats, perlfaq6 - Regular +Expressions, perlfaq7 - General Perl Language Issues, perlfaq8 - System +Interaction, perlfaq9 - Networking -=back +=item The Questions -=item TODO +=over 4 -=item SEE ALSO +=item L: General Questions About Perl -=item AUTHOR - -=back - -=head2 perldebtut - Perl debugging tutorial - -=over 4 - -=item DESCRIPTION +=item L: Obtaining and Learning about Perl -=item use strict +=item L: Programming Tools -=item Looking at data and -w and v +=item L: Data Manipulation -=item help +=item L: Files and Formats -=item Stepping through code +=item L: Regular Expressions -=item Placeholder for a, w, t, T +=item L: General Perl Language Issues -=item REGULAR EXPRESSIONS +=item L: System Interaction -=item OUTPUT TIPS +=item L: Networking -=item CGI +=back -=item GUIs +=back -=item SUMMARY +=head2 perlfaq1 - General Questions About Perl ($Revision: 3606 $) -=item SEE ALSO +=over 4 -=item AUTHOR +=item DESCRIPTION -=item CONTRIBUTORS +=over 4 -=back +=item What is Perl? -=head2 perldebug - Perl debugging +=item Who supports Perl? Who develops it? Why is it free? -=over 4 +=item Which version of Perl should I use? -=item DESCRIPTION +=item What are perl4, perl5, or perl6? -=item The Perl Debugger +=item What is Ponie? -=over 4 +=item What is perl6? -=item Debugger Commands +=item How stable is Perl? -h, h [command], h h, p expr, x [maxdepth] expr, V [pkg [vars]], X [vars], -T, s [expr], n [expr], r, , c [line|sub], l, l min+incr, l min-max, l -line, l subname, -, v [line], f filename, /pattern/, ?pattern?, L [abw], S -[[!]regex], t, t expr, b, b [line] [condition], b subname [condition], b -postpone subname [condition], b load filename, b compile subname, B line, B -*, a [line] command, A line, A *, w expr, W expr, W *, o, o booloption .., -o anyoption? .., o option=value .., < ?, < [ command ], << command, > ?, > -command, >> command, { ?, { [ command ], {{ command, ! number, ! -number, ! -pattern, !! cmd, @ file, H -number, q or ^D, R, |dbcmd, ||dbcmd, command, m -expr, M, man [manpage] +=item Is Perl difficult to learn? -=item Configurable Options +=item How does Perl compare with other languages like Java, Python, REXX, +Scheme, or Tcl? -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C +=item Can I do [task] in Perl? -=item Debugger input/output +=item When shouldn't I program in Perl? -Prompt, Multiline commands, Stack backtrace, Line Listing Format, Frame -listing +=item What's the difference between "perl" and "Perl"? -=item Debugging compile-time statements +=item Is it a Perl program or a Perl script? -=item Debugger Customization +=item What is a JAPH? -=item Readline Support +=item Where can I get a list of Larry Wall witticisms? -=item Editor Support for Debugging +=item How can I convince others to use Perl? -=item The Perl Profiler +http://perltraining.com.au/whyperl.html, +http://www.perl.org/advocacy/whyperl.html =back -=item Debugging regular expressions - -=item Debugging memory usage - -=item SEE ALSO +=item REVISION -=item BUGS +=item AUTHOR AND COPYRIGHT =back -=head2 perlvar - Perl predefined variables +=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 3606 $) =over 4 @@ -1299,354 +923,359 @@ listing =over 4 -=item Predefined Names +=item What machines support perl? Where do I get it? -$ARG, $_, $a, $b, $>, $MATCH, $&, $PREMATCH, $`, $POSTMATCH, $', -$LAST_PAREN_MATCH, $+, $^N, @LAST_MATCH_END, @+, $MULTILINE_MATCHING, $*, -HANDLE->input_line_number(EXPR), $INPUT_LINE_NUMBER, $NR, $, -IO::Handle->input_record_separator(EXPR), $INPUT_RECORD_SEPARATOR, $RS, $/, -HANDLE->autoflush(EXPR), $OUTPUT_AUTOFLUSH, $|, -IO::Handle->output_field_separator EXPR, $OUTPUT_FIELD_SEPARATOR, $OFS, $,, -IO::Handle->output_record_separator EXPR, $OUTPUT_RECORD_SEPARATOR, $ORS, -$\, $LIST_SEPARATOR, $", $SUBSCRIPT_SEPARATOR, $SUBSEP, $;, $OFMT, $#, -HANDLE->format_page_number(EXPR), $FORMAT_PAGE_NUMBER, $%, -HANDLE->format_lines_per_page(EXPR), $FORMAT_LINES_PER_PAGE, $=, -HANDLE->format_lines_left(EXPR), $FORMAT_LINES_LEFT, $-, @LAST_MATCH_START, -@-, C<$`> is the same as C, C<$&> is the same as -C, C<$'> is the same as C, C<$1> is the same as C, C<$2> -is the same as C, C<$3> is the same as -C, HANDLE->format_name(EXPR), -$FORMAT_NAME, $~, HANDLE->format_top_name(EXPR), $FORMAT_TOP_NAME, $^, -IO::Handle->format_line_break_characters EXPR, -$FORMAT_LINE_BREAK_CHARACTERS, $:, IO::Handle->format_formfeed EXPR, -$FORMAT_FORMFEED, $^L, $ACCUMULATOR, $^A, $CHILD_ERROR, $?, ${^ENCODING}, -$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, -${^OPEN}, $PERLDB, $^P, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, -0x100, 0x200, $LAST_REGEXP_CODE_RESULT, $^R, $EXCEPTIONS_BEING_CAUGHT, $^S, -$BASETIME, $^T, ${^TAINT}, $PERL_VERSION, $^V, $WARNING, $^W, -${^WARNING_BITS}, ${^WIDE_SYSTEM_CALLS}, $EXECUTABLE_NAME, $^X, ARGV, -$ARGV, @ARGV, @F, @INC, @_, %INC, %ENV, $ENV{expr}, %SIG, $SIG{expr} +=item How can I get a binary version of perl? -=item Error Indicators +=item I don't have a C compiler. How can I build my own Perl interpreter? -=item Technical Note on the Syntax of Variable Names +=item I copied the perl binary from one machine to another, but scripts +don't work. -=back +=item I grabbed the sources and tried to compile but gdbm/dynamic +loading/malloc/linking/... failed. How do I make it work? -=item BUGS +=item What modules and extensions are available for Perl? What is CPAN? +What does CPAN/src/... mean? -=back +=item Is there an ISO or ANSI certified version of Perl? -=head2 perllol - Manipulating Arrays of Arrays in Perl +=item Where can I get information on Perl? -=over 4 +=item What are the Perl newsgroups on Usenet? Where do I post questions? -=item DESCRIPTION +=item Where should I post source code? -=over 4 +=item Perl Books -=item Declaration and Access of Arrays of Arrays +References, Tutorials, Task-Oriented, Special Topics -=item Growing Your Own +=item Which magazines have Perl content? -=item Access and Printing +=item What mailing lists are there for Perl? -=item Slices +=item Where are the archives for comp.lang.perl.misc? + +=item Where can I buy a commercial version of perl? + +=item Where do I send bug reports? + +=item What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? =back -=item SEE ALSO +=item REVISION -=item AUTHOR +=item AUTHOR AND COPYRIGHT =back -=head2 perlopentut - tutorial on opening things in Perl +=head2 perlfaq3 - Programming Tools ($Revision: 3606 $) =over 4 =item DESCRIPTION -=item Open E la shell - =over 4 -=item Simple Opens +=item How do I do (anything)? -=item Pipe Opens +=item How can I use Perl interactively? -=item The Minus File +=item Is there a Perl shell? -=item Mixing Reads and Writes +=item How do I find which modules are installed on my system? -=item Filters +=item How do I debug my Perl programs? -=back +=item How do I profile my Perl programs? -=item Open E la C +=item How do I cross-reference my Perl programs? -=over 4 +=item Is there a pretty-printer (formatter) for Perl? -=item Permissions E la mode +=item Is there a ctags for Perl? -=back +=item Is there an IDE or Windows Perl Editor? -=item Obscure Open Tricks +Eclipse, Enginsite, Komodo, Open Perl IDE, OptiPerl, PerlBuilder, +visiPerl+, Visual Perl, Zeus, GNU Emacs, MicroEMACS, XEmacs, Jed, Elvis, +Vile, Vim, Codewright, MultiEdit, SlickEdit, Bash, Ksh, Tcsh, Zsh, Affrus, +Alpha, BBEdit and BBEdit Lite -=over 4 +=item Where can I get Perl macros for vi? -=item Re-Opening Files (dups) +=item Where can I get perl-mode for emacs? -=item Dispelling the Dweomer +=item How can I use curses with Perl? -=item Paths as Opens +=item How can I use X or Tk with Perl? -=item Single Argument Open +=item How can I make my Perl program run faster? -=item Playing with STDIN and STDOUT +=item How can I make my Perl program take less memory? -=back +Don't slurp!, Use map and grep selectively, Avoid unnecessary quotes and +stringification, Pass by reference, Tie large variables to disk -=item Other I/O Issues +=item Is it safe to return a reference to local or lexical data? -=over 4 +=item How can I free an array or hash so my program shrinks? -=item Opening Non-File Files +=item How can I make my CGI script more efficient? -=item Binary Files +=item How can I hide the source for my Perl program? -=item File Locking +=item How can I compile my Perl program into byte code or C? -=back +=item How can I compile Perl into Java? -=item SEE ALSO +=item How can I get C<#!perl> to work on [MS-DOS,NT,...]? -=item AUTHOR and COPYRIGHT +=item Can I write useful Perl programs on the command line? -=item HISTORY +=item Why don't Perl one-liners work on my DOS/Mac/VMS system? -=back +=item Where can I learn about CGI or Web programming in Perl? -=head2 perlpacktut - tutorial on C and C +=item Where can I learn about object-oriented Perl programming? -=over 4 +=item Where can I learn about linking C with Perl? -=item DESCRIPTION +=item I've read perlembed, perlguts, etc., but I can't embed perl in my C +program; what am I doing wrong? -=item The Basic Principle +=item When I tried to run my script, I got this message. What does it mean? -=item Packing Text +=item What's MakeMaker? -=item Packing Numbers +=back -=over 4 +=item REVISION -=item Integers +=item AUTHOR AND COPYRIGHT -=item Unpacking a Stack Frame +=back -=item How to Eat an Egg on a Net +=head2 perlfaq4 - Data Manipulation ($Revision: 3606 $) -=item Floating point Numbers +=over 4 -=back +=item DESCRIPTION -=item Exotic Templates +=item Data: Numbers =over 4 -=item Bit Strings +=item Why am I getting long decimals (eg, 19.9499999999999) instead of the +numbers I should be getting (eg, 19.95)? -=item Uuencoding +=item Why is int() broken? -=item Doing Sums +=item Why isn't my octal data interpreted correctly? -=item Unicode +=item Does Perl have a round() function? What about ceil() and floor()? +Trig functions? -=item Another Portable Binary Encoding +=item How do I convert between numeric representations/bases/radixes? -=back +How do I convert hexadecimal into decimal, How do I convert from decimal to +hexadecimal, How do I convert from octal to decimal, How do I convert from +decimal to octal, How do I convert from binary to decimal, How do I convert +from decimal to binary -=item Lengths and Widths +=item Why doesn't & work the way I want it to? -=over 4 +=item How do I multiply matrices? -=item String Lengths +=item How do I perform an operation on a series of integers? -=item Dynamic Templates +=item How can I output Roman numerals? + +=item Why aren't my random numbers random? + +=item How do I get a random number between X and Y? =back -=item Packing and Unpacking C Structures +=item Data: Dates =over 4 -=item The Alignment Pit - -=item Alignment, Take 2 +=item How do I find the day or week of the year? -=item Alignment, Take 3 +=item How do I find the current century or millennium? -=item Pointers for How to Use Them +=item How can I compare two dates and find the difference? -=back +=item How can I take a string and turn it into epoch seconds? -=item Pack Recipes +=item How can I find the Julian Day? -=item Funnies Section +=item How do I find yesterday's date? -=item Authors +=item Does Perl have a Year 2000 problem? Is Perl Y2K compliant? =back -=head2 perlretut - Perl regular expressions tutorial +=item Data: Strings =over 4 -=item DESCRIPTION +=item How do I validate input? -=item Part 1: The basics +=item How do I unescape a string? -=over 4 +=item How do I remove consecutive pairs of characters? -=item Simple word matching +=item How do I expand function calls in a string? -=item Using character classes +=item How do I find matching/nesting anything? -=item Matching this or that +=item How do I reverse a string? -=item Grouping things and hierarchical matching +=item How do I expand tabs in a string? -=item Extracting matches +=item How do I reformat a paragraph? -=item Matching repetitions +=item How can I access or change N characters of a string? -=item Building a regexp +=item How do I change the Nth occurrence of something? -=item Using regular expressions in Perl +=item How can I count the number of occurrences of a substring within a +string? -=back +=item How do I capitalize all the words on one line? -=item Part 2: Power tools +=item How can I split a [character] delimited string except when inside +[character]? -=over 4 +=item How do I strip blank space from the beginning/end of a string? -=item More on characters, strings, and character classes +=item How do I pad a string with blanks or pad a number with zeroes? -=item Compiling and saving regular expressions +=item How do I extract selected columns from a string? -=item Embedding comments and modifiers in a regular expression +=item How do I find the soundex value of a string? -=item Non-capturing groupings +=item How can I expand variables in text strings? -=item Looking ahead and looking behind +=item What's wrong with always quoting "$vars"? -=item Using independent subexpressions to prevent backtracking +=item Why don't my EEHERE documents work? -=item Conditional expressions +There must be no space after the EE part, There (probably) should +be a semicolon at the end, You can't (easily) have any space in front of +the tag -=item A bit of magic: executing Perl code in a regular expression +=back -=item Pragmas and debugging +=item Data: Arrays -=back +=over 4 -=item BUGS +=item What is the difference between a list and an array? -=item SEE ALSO +=item What is the difference between $array[1] and @array[1]? -=item AUTHOR AND COPYRIGHT +=item How can I remove duplicate elements from a list or array? -=over 4 +=item How can I tell whether a certain element is contained in a list or +array? -=item Acknowledgments +=item How do I compute the difference of two arrays? How do I compute the +intersection of two arrays? -=back +=item How do I test whether two arrays or hashes are equal? -=back +=item How do I find the first array element for which a condition is true? -=head2 perlre - Perl regular expressions +=item How do I handle linked lists? -=over 4 +=item How do I handle circular lists? -=item DESCRIPTION +=item How do I shuffle an array randomly? -i, m, s, x +=item How do I process/modify each element of an array? -=over 4 +=item How do I select a random element from an array? -=item Regular Expressions +=item How do I permute N elements of a list? -[1], [2], [3], cntrl, graph, print, punct, xdigit +=item How do I sort an array by (anything)? -=item Extended Patterns +=item How do I manipulate arrays of bits? -C<(?#text)>, C<(?imsx-imsx)>, C<(?:pattern)>, C<(?imsx-imsx:pattern)>, -C<(?=pattern)>, C<(?!pattern)>, C<(?<=pattern)>, C<(?, C<(?{ -code })>, C<(??{ code })>, C<< (?>pattern) >>, -C<(?(condition)yes-pattern|no-pattern)>, C<(?(condition)yes-pattern)> +=item Why does defined() return true on empty arrays and hashes? -=item Backtracking +=back -=item Version 8 Regular Expressions +=item Data: Hashes (Associative Arrays) -=item Warning on \1 vs $1 +=over 4 -=item Repeated patterns matching zero-length substring +=item How do I process an entire hash? -=item Combining pieces together +=item What happens if I add or remove keys from a hash while iterating over +it? -C, C, C, C, C, C, -C, C, C, C, C, C<< (?>S) >>, C<(?=S)>, C<(?<=S)>, -C<(?!S)>, C<(?, C<(??{ EXPR })>, -C<(?(condition)yes-pattern|no-pattern)> +=item How do I look up a hash element by value? -=item Creating custom RE engines +=item How can I know how many entries are in a hash? -=back +=item How do I sort a hash (optionally by value instead of key)? -=item BUGS +=item How can I always keep my hash sorted? -=item SEE ALSO +=item What's the difference between "delete" and "undef" with hashes? -=back +=item Why don't my tied hashes make the defined/exists distinction? -=head2 perlref - Perl references and nested data structures +=item How do I reset an each() operation part-way through? -=over 4 +=item How can I get the unique keys from two hashes? -=item NOTE +=item How can I store a multidimensional array in a DBM file? -=item DESCRIPTION +=item How can I make my hash remember the order I put elements into it? + +=item Why does passing a subroutine an undefined element in a hash create +it? + +=item How can I make the Perl equivalent of a C structure/C++ class/hash or +array of hashes or arrays? + +=item How can I use a reference as a hash key? + +=back + +=item Data: Misc =over 4 -=item Making References +=item How do I handle binary data correctly? -=item Using References +=item How do I determine whether a scalar is a number/whole/integer/float? -=item Symbolic references +=item How do I keep persistent data across program calls? -=item Not-so-symbolic references +=item How do I print out or copy a recursive data structure? -=item Pseudo-hashes: Using an array as a hash +=item How do I define methods for every class/object? -=item Function Templates +=item How do I verify a credit card checksum? + +=item How do I pack arrays of doubles or floats for XS code? =back -=item WARNING +=item REVISION -=item SEE ALSO +=item AUTHOR AND COPYRIGHT =back -=head2 perlform - Perl formats +=head2 perlfaq5 - Files and Formats ($Revision: 3606 $) =over 4 @@ -1654,241 +1283,310 @@ C<(?(condition)yes-pattern|no-pattern)> =over 4 -=item Format Variables +=item How do I flush/unbuffer an output filehandle? Why must I do this? +X X X X -=back +=item How do I change one line in a file/delete a line in a file/insert a +line in the middle of a file/append to the beginning of a file? +X -=item NOTES +=item How do I count the number of lines in a file? +X X X -=over 4 +=item How can I use Perl's C<-i> option from within a program? +X<-i> X -=item Footers +=item How can I copy a file? +X X -=item Accessing Formatting Internals +=item How do I make a temporary file name? +X -=back +=item How can I manipulate fixed-record-length files? +X X -=item WARNINGS +=item How can I make a filehandle local to a subroutine? How do I pass +filehandles between subroutines? How do I make an array of filehandles? +X X X -=back +=item How can I use a filehandle indirectly? +X -=head2 perlboot - Beginner's Object-Oriented Tutorial +=item How can I set up a footer format to be used with write()? +X