X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltoc.pod;h=6536974f8cacc13e7c0b732a6c60c42f0943650e;hb=d7d7d533fb289d8ec4fa1b5fb02f927ed0cb90cc;hp=f7cd79a2a1da9df66aaa6a6b6bf622a00f774f54;hpb=6f8d6a2d7d7811dd7148ac47335df9d660beea0f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltoc.pod b/pod/perltoc.pod index f7cd79a..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 @@ -67,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 @@ -103,113 +109,147 @@ Parentheses for capturing, Other regexp features =back -=head2 perlfaq - frequently asked questions about Perl ($Date: 2003/01/31 -17:37:17 $) +=head2 perlreftut - Mark's very short tutorial about references =over 4 =item DESCRIPTION +=item Who Needs Complicated Data Structures? + +=item The Solution + +=item Syntax + =over 4 -=item Where to get the perlfaq +=item Making References -=item How to contribute to the perlfaq +=item Using References -=item What will happen if you mail your Perl programming problems to the -authors +=item An Example + +=item Arrow Rule =back -=item Credits +=item Solution -=item Author and Copyright Information +=item The Rest + +=item Summary + +=item Credits =over 4 -=item Bundled Distributions +=item Distribution Conditions -=item Disclaimer +=back =back -=item Table of Contents +=head2 perldsc - Perl Data Structures Cookbook -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 +=over 4 -=item The Questions +=item DESCRIPTION -=over 4 +arrays of arrays, hashes of arrays, arrays of hashes, hashes of hashes, +more elaborate constructs -=item L: General Questions About Perl +=item REFERENCES +X X X X -=item L: Obtaining and Learning about Perl +=item COMMON MISTAKES -=item L: Programming Tools +=item CAVEAT ON PRECEDENCE +X X -=item L: Data Manipulation +=item WHY YOU SHOULD ALWAYS C -=item L: Files and Formats +=item DEBUGGING +X X +X X X X +X X +X X -=item L: Regular Expressions +=item CODE EXAMPLES -=item L: General Perl Language Issues +=item ARRAYS OF ARRAYS +X X -=item L: System Interaction +=over 4 -=item L: Networking +=item Declaration of an ARRAY OF ARRAYS -=back +=item Generation of an ARRAY OF ARRAYS + +=item Access and Printing of an ARRAY OF ARRAYS =back -=head2 perlbook - Perl book information +=item HASHES OF ARRAYS +X X =over 4 -=item DESCRIPTION +=item Declaration of a HASH OF ARRAYS + +=item Generation of a HASH OF ARRAYS + +=item Access and Printing of a HASH OF ARRAYS =back -=head2 perlsyn - Perl syntax +=item ARRAYS OF HASHES +X X =over 4 -=item DESCRIPTION +=item Declaration of an ARRAY OF HASHES -=over 4 +=item Generation of an ARRAY OF HASHES -=item Declarations +=item Access and Printing of an ARRAY OF HASHES -=item Comments +=back -=item Simple Statements +=item HASHES OF HASHES +X X -=item Compound Statements +=over 4 -=item Loop Control +=item Declaration of a HASH OF HASHES -=item For Loops +=item Generation of a HASH OF HASHES -=item Foreach Loops +=item Access and Printing of a HASH OF HASHES -=item Basic BLOCKs and Switch Statements +=back -=item Goto +=item MORE ELABORATE RECORDS +X X X -=item PODs: Embedded Documentation +=over 4 -=item Plain Old Comments (Not!) +=item Declaration of MORE ELABORATE RECORDS + +=item Declaration of a HASH OF COMPLEX RECORDS + +=item Generation of a HASH OF COMPLEX RECORDS =back +=item Database Ties + +=item SEE ALSO + +=item AUTHOR + =back -=head2 perldata - Perl data types +=head2 perllol - Manipulating Arrays of Arrays in Perl =over 4 @@ -217,168 +257,133 @@ Interaction, perlfaq9 - Networking =over 4 -=item Variable names - -=item Context - -=item Scalar values - -=item Scalar value constructors +=item Declaration and Access of Arrays of Arrays -=item List value constructors +=item Growing Your Own -=item Subscripts +=item Access and Printing =item Slices -=item Typeglobs and Filehandles - =back =item SEE ALSO +=item AUTHOR + =back -=head2 perlop - Perl operators and precedence +=head2 perlrequick - Perl regular expressions quick start =over 4 -=item SYNOPSIS - =item DESCRIPTION -=over 4 - -=item Terms and List Operators (Leftward) - -=item The Arrow Operator - -=item Auto-increment and Auto-decrement - -=item Exponentiation - -=item Symbolic Unary Operators - -=item Binding Operators - -=item Multiplicative Operators - -=item Additive Operators +=item The Guide -=item Shift Operators +=over 4 -=item Named Unary Operators +=item Simple word matching -=item Relational Operators +=item Using character classes -=item Equality Operators +=item Matching this or that -=item Bitwise And +=item Grouping things and hierarchical matching -=item Bitwise Or and Exclusive Or +=item Extracting matches -=item C-style Logical And +=item Matching repetitions -=item C-style Logical Or +=item More matching -=item C-style Logical Defined-Or +=item Search and replace -=item Range Operators +=item The split operator -=item Conditional Operator +=back -=item Assignment Operators +=item BUGS -=item Comma Operator +=item SEE ALSO -=item List Operators (Rightward) +=item AUTHOR AND COPYRIGHT -=item Logical Not +=over 4 -=item Logical And +=item Acknowledgments -=item Logical or, Defined or, and Exclusive Or +=back -=item C Operators Missing From Perl +=back -unary &, unary *, (TYPE) +=head2 perlretut - Perl regular expressions tutorial -=item Quote and Quote-like Operators +=over 4 -=item Regexp Quote-Like Operators +=item DESCRIPTION -?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 +=item Simple word matching -=item I/O Operators +=item Using character classes -=item Constant Folding +=item Matching this or that -=item Bitwise String Operators +=item Grouping things and hierarchical matching -=item Integer Arithmetic +=item Extracting matches -=item Floating-point Arithmetic +=item Matching repetitions -=item Bigger Numbers +=item Building a regexp -=back +=item Using regular expressions in Perl =back -=head2 perlsub - Perl subroutines +=item Part 2: Power tools =over 4 -=item SYNOPSIS - -=item DESCRIPTION +=item More on characters, strings, and character classes -=over 4 +=item Compiling and saving regular expressions -=item Private Variables via my() +=item Embedding comments and modifiers in a regular expression -=item Persistent Private Variables +=item Non-capturing groupings -=item Temporary Values via local() +=item Looking ahead and looking behind -=item Lvalue subroutines +=item Using independent subexpressions to prevent backtracking -Lvalue subroutines are EXPERIMENTAL +=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 @@ -386,364 +391,271 @@ Lvalue subroutines are EXPERIMENTAL =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 FILEHANDLE, -I EXPR, -I, abs VALUE, abs, accept -NEWSOCKET,GENERICSOCKET, alarm SECONDS, alarm, atan2 Y,X, bind SOCKET,NAME, -binmode FILEHANDLE, LAYER, 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 -TYPE EXPR, my EXPR : ATTRS, my TYPE EXPR : ATTRS, next LABEL, next, no -Module VERSION LIST, no Module VERSION, no Module LIST, no Module, 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 TYPE, our EXPR : -ATTRS, our TYPE EXPR : ATTRS, 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, 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, format -parameter index, flags, vector flag, (minimum) width, precision, or maximum -width, size, order of arguments, sqrt EXPR, sqrt, srand EXPR, srand, stat -FILEHANDLE, stat EXPR, stat, study SCALAR, study, sub NAME BLOCK, sub NAME -(PROTO) BLOCK, sub NAME : ATTRS BLOCK, sub NAME (PROTO) : ATTRS 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, unpack TEMPLATE, 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 - -=back +=item Inheriting the windpipes -=head2 perlreftut - Mark's very short tutorial about references +=item A few notes about @ISA -=over 4 +=item Overriding the methods -=item DESCRIPTION +=item Starting the search from a different place -=item Who Needs Complicated Data Structures? +=item The SUPER way of doing things -=item The Solution +=item Where we're at so far... -=item Syntax +=item A horse is a horse, of course of course -- or is it? -=over 4 +=item Invoking an instance method -=item Making References +=item Accessing the instance data -=item Using References +=item How to build a horse -=item An Example +=item Inheriting the constructor -=item Arrow Rule +=item Making a method work with either classes or instances -=back +=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 @@ -774,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, 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 @@ -832,55 +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 -B<-0>[I], B<-A [I]>, B<-a>, B<-C -[I]>, 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 REGULAR EXPRESSIONS -=back +=item OUTPUT TIPS -=item ENVIRONMENT +=item CGI -HOME, LOGDIR, PATH, PERL5LIB, PERL5OPT, PERLIO, :bytes, :crlf, :mmap, -:perlio, :pop, :raw, :stdio, :unix, :utf8, :win32, PERLIO_DEBUG, PERLLIB, -PERL5DB, PERL5SHELL (specific to the Win32 port), PERL_DEBUG_MSTATS, -PERL_DESTRUCT_LEVEL, PERL_ENCODING, PERL_HASH_SEED, PERL_HASH_SEED_DEBUG, -PERL_ROOT (specific to the VMS port), PERL_SIGNALS, PERL_UNICODE, SYS$LOGIN -(specific to the VMS port) +=item GUIs -=back +=item SUMMARY -=head2 perldiag - various Perl diagnostics +=item SEE ALSO -=over 4 +=item AUTHOR -=item DESCRIPTION +=item CONTRIBUTORS =back -=head2 perllexwarn - Perl Lexical Warnings +=head2 perlfaq - frequently asked questions about Perl ($Revision: 3606 $) =over 4 @@ -888,128 +816,106 @@ PERL_ROOT (specific to the VMS port), PERL_SIGNALS, PERL_UNICODE, SYS$LOGIN =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 Controlling Warnings from the Command Line - -B<-w>, B<-W>, B<-X> - -=item Backward Compatibility - -=item Category Hierarchy - -=item Fatal Warnings +=item How to contribute to the perlfaq -=item Reporting Warnings from a Module +=item What will happen if you mail your Perl programming problems to the +authors? =back -=item TODO +=item CREDITS -=item SEE ALSO +=item AUTHOR AND COPYRIGHT -=item AUTHOR +=item Table of Contents -=back +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 -=head2 perldebtut - Perl debugging tutorial +=item The Questions =over 4 -=item DESCRIPTION - -=item use strict - -=item Looking at data and -w and v - -=item help - -=item Stepping through code +=item L: General Questions About Perl -=item Placeholder for a, w, t, T +=item L: Obtaining and Learning about Perl -=item REGULAR EXPRESSIONS +=item L: Programming Tools -=item OUTPUT TIPS +=item L: Data Manipulation -=item CGI +=item L: Files and Formats -=item GUIs +=item L: Regular Expressions -=item SUMMARY +=item L: General Perl Language Issues -=item SEE ALSO +=item L: System Interaction -=item AUTHOR +=item L: Networking -=item CONTRIBUTORS +=back =back -=head2 perldebug - Perl debugging +=head2 perlfaq1 - General Questions About Perl ($Revision: 3606 $) =over 4 =item DESCRIPTION -=item The Perl Debugger - =over 4 -=item Debugger Commands +=item What is Perl? -h, h [command], h h, p expr, x [maxdepth] expr, V [pkg [vars]], X [vars], y -[level [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, source -file, H -number, q or ^D, R, |dbcmd, ||dbcmd, command, m expr, M, man -[manpage] +=item Who supports Perl? Who develops it? Why is it free? -=item Configurable Options +=item Which version of Perl should I use? -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 What are perl4, perl5, or perl6? -=item Debugger input/output +=item What is Ponie? -Prompt, Multiline commands, Stack backtrace, Line Listing Format, Frame -listing +=item What is perl6? -=item Debugging compile-time statements +=item How stable is Perl? -=item Debugger Customization +=item Is Perl difficult to learn? -=item Readline Support +=item How does Perl compare with other languages like Java, Python, REXX, +Scheme, or Tcl? -=item Editor Support for Debugging +=item Can I do [task] in Perl? -=item The Perl Profiler +=item When shouldn't I program in Perl? -=back +=item What's the difference between "perl" and "Perl"? -=item Debugging regular expressions +=item Is it a Perl program or a Perl script? -=item Debugging memory usage +=item What is a JAPH? -=item SEE ALSO +=item Where can I get a list of Larry Wall witticisms? -=item BUGS +=item How can I convince others to use Perl? + +http://perltraining.com.au/whyperl.html, +http://www.perl.org/advocacy/whyperl.html =back -=head2 perlvar - Perl predefined variables +=item REVISION + +=item AUTHOR AND COPYRIGHT + +=back + +=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 3606 $) =over 4 @@ -1017,393 +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, @+, -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, 0x400, $LAST_REGEXP_CODE_RESULT, $^R, -$EXCEPTIONS_BEING_CAUGHT, $^S, $BASETIME, $^T, ${^TAINT}, ${^UNICODE}, -$PERL_VERSION, $^V, $WARNING, $^W, ${^WARNING_BITS}, $EXECUTABLE_NAME, $^X, -ARGV, $ARGV, @ARGV, ARGVOUT, @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 Indirect Filehandles +=item How can I use Perl interactively? -=item Pipe Opens +=item Is there a Perl shell? -=item The Minus File +=item How do I find which modules are installed on my system? -=item Mixing Reads and Writes +=item How do I debug my Perl programs? -=item Filters +=item How do I profile my Perl programs? -=back +=item How do I cross-reference my Perl programs? -=item Open E la C +=item Is there a pretty-printer (formatter) for Perl? -=over 4 +=item Is there a ctags for Perl? -=item Permissions E la mode +=item Is there an IDE or Windows Perl Editor? -=back +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 -=item Obscure Open Tricks +=item Where can I get Perl macros for vi? -=over 4 +=item Where can I get perl-mode for emacs? -=item Re-Opening Files (dups) +=item How can I use curses with Perl? -=item Dispelling the Dweomer +=item How can I use X or Tk with Perl? -=item Paths as Opens +=item How can I make my Perl program run faster? -=item Single Argument Open +=item How can I make my Perl program take less memory? -=item Playing with STDIN and STDOUT +Don't slurp!, Use map and grep selectively, Avoid unnecessary quotes and +stringification, Pass by reference, Tie large variables to disk -=back +=item Is it safe to return a reference to local or lexical data? -=item Other I/O Issues +=item How can I free an array or hash so my program shrinks? -=over 4 +=item How can I make my CGI script more efficient? -=item Opening Non-File Files +=item How can I hide the source for my Perl program? -=item Opening Named Pipes +=item How can I compile my Perl program into byte code or C? -=item Opening Sockets +=item How can I compile Perl into Java? -=item Binary Files +=item How can I get C<#!perl> to work on [MS-DOS,NT,...]? -=item File Locking +=item Can I write useful Perl programs on the command line? -=item IO Layers +=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? -=item SEE ALSO +=item Where can I learn about object-oriented Perl programming? -=item AUTHOR and COPYRIGHT +=item Where can I learn about linking C with Perl? -=item HISTORY +=item I've read perlembed, perlguts, etc., but I can't embed perl in my C +program; what am I doing wrong? -=back +=item When I tried to run my script, I got this message. What does it mean? -=head2 perlpacktut - tutorial on C and C +=item What's MakeMaker? -=over 4 +=back -=item DESCRIPTION +=item REVISION -=item The Basic Principle +=item AUTHOR AND COPYRIGHT -=item Packing Text +=back -=item Packing Numbers +=head2 perlfaq4 - Data Manipulation ($Revision: 3606 $) =over 4 -=item Integers - -=item Unpacking a Stack Frame - -=item How to Eat an Egg on a Net - -=item Floating point Numbers - -=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 Template Grouping +=item Why doesn't & work the way I want it to? -=item Lengths and Widths +=item How do I multiply matrices? -=over 4 +=item How do I perform an operation on a series of integers? -=item String Lengths +=item How can I output Roman numerals? -=item Dynamic Templates +=item Why aren't my random numbers random? -=item Counting Repetitions +=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 How do I find the day or week of the year? -=item Alignment, Take 2 +=item How do I find the current century or millennium? -=item Alignment, Take 3 +=item How can I compare two dates and find the difference? -=item Pointers for How to Use Them +=item How can I take a string and turn it into epoch seconds? -=back +=item How can I find the Julian Day? -=item Pack Recipes - -=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 Part 1: The basics - -=over 4 +=item How do I validate input? -=item Simple word matching +=item How do I unescape a string? -=item Using character classes +=item How do I remove consecutive pairs of characters? -=item Matching this or that +=item How do I expand function calls in a string? -=item Grouping things and hierarchical matching +=item How do I find matching/nesting anything? -=item Extracting matches +=item How do I reverse a string? -=item Matching repetitions +=item How do I expand tabs in a string? -=item Building a regexp +=item How do I reformat a paragraph? -=item Using regular expressions in Perl +=item How can I access or change N characters of a string? -=back +=item How do I change the Nth occurrence of something? -=item Part 2: Power tools +=item How can I count the number of occurrences of a substring within a +string? -=over 4 +=item How do I capitalize all the words on one line? -=item More on characters, strings, and character classes +=item How can I split a [character] delimited string except when inside +[character]? -=item Compiling and saving regular expressions +=item How do I strip blank space from the beginning/end of a string? -=item Embedding comments and modifiers in a regular expression +=item How do I pad a string with blanks or pad a number with zeroes? -=item Non-capturing groupings +=item How do I extract selected columns from a string? -=item Looking ahead and looking behind +=item How do I find the soundex value of a string? -=item Using independent subexpressions to prevent backtracking +=item How can I expand variables in text strings? -=item Conditional expressions +=item What's wrong with always quoting "$vars"? -=item A bit of magic: executing Perl code in a regular expression +=item Why don't my EEHERE documents work? -=item Pragmas and debugging +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 =back -=item BUGS - -=item SEE ALSO - -=item AUTHOR AND COPYRIGHT +=item Data: Arrays =over 4 -=item Acknowledgments - -=back - -=back - -=head2 perlre - Perl regular expressions +=item What is the difference between a list and an array? -=over 4 +=item What is the difference between $array[1] and @array[1]? -=item DESCRIPTION +=item How can I remove duplicate elements from a list or array? -i, m, s, x +=item How can I tell whether a certain element is contained in a list or +array? -=over 4 +=item How do I compute the difference of two arrays? How do I compute the +intersection of two arrays? -=item Regular Expressions +=item How do I test whether two arrays or hashes are equal? -[1], [2], [3], cntrl, graph, print, punct, xdigit +=item How do I find the first array element for which a condition is true? -=item Extended Patterns +=item How do I handle linked lists? -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 How do I handle circular lists? -=item Backtracking +=item How do I shuffle an array randomly? -=item Version 8 Regular Expressions +=item How do I process/modify each element of an array? -=item Warning on \1 vs $1 +=item How do I select a random element from an array? -=item Repeated patterns matching zero-length substring +=item How do I permute N elements of a list? -=item Combining pieces together +=item How do I sort an array by (anything)? -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 manipulate arrays of bits? -=item Creating custom RE engines +=item Why does defined() return true on empty arrays and hashes? =back -=item BUGS +=item Data: Hashes (Associative Arrays) -=item SEE ALSO +=over 4 -=back +=item How do I process an entire hash? -=head2 perlref - Perl references and nested data structures +=item What happens if I add or remove keys from a hash while iterating over +it? -=over 4 +=item How do I look up a hash element by value? -=item NOTE +=item How can I know how many entries are in a hash? -=item DESCRIPTION +=item How do I sort a hash (optionally by value instead of key)? -=over 4 +=item How can I always keep my hash sorted? -=item Making References +=item What's the difference between "delete" and "undef" with hashes? -=item Using References +=item Why don't my tied hashes make the defined/exists distinction? -=item Symbolic references +=item How do I reset an each() operation part-way through? -=item Not-so-symbolic references +=item How can I get the unique keys from two hashes? -=item Pseudo-hashes: Using an array as a hash +=item How can I store a multidimensional array in a DBM file? -=item Function Templates +=item How can I make my hash remember the order I put elements into it? -=back +=item Why does passing a subroutine an undefined element in a hash create +it? -=item WARNING +=item How can I make the Perl equivalent of a C structure/C++ class/hash or +array of hashes or arrays? -=item SEE ALSO +=item How can I use a reference as a hash key? =back -=head2 perlform - Perl formats +=item Data: Misc =over 4 -=item DESCRIPTION - -=over 4 +=item How do I handle binary data correctly? -=item Format Variables +=item How do I determine whether a scalar is a number/whole/integer/float? -=back +=item How do I keep persistent data across program calls? -=item NOTES +=item How do I print out or copy a recursive data structure? -=over 4 +=item How do I define methods for every class/object? -=item Footers +=item How do I verify a credit card checksum? -=item Accessing Formatting Internals +=item How do I pack arrays of doubles or floats for XS code? =back -=item WARNINGS +=item REVISION + +=item AUTHOR AND COPYRIGHT =back -=head2 perlboot - Beginner's Object-Oriented Tutorial +=head2 perlfaq5 - Files and Formats ($Revision: 3606 $) =over 4 @@ -1411,1204 +1283,1747 @@ C<(?(condition)yes-pattern|no-pattern)> =over 4 -=item If we could talk to the animals... - -=item Introducing the method invocation arrow - -=item Invoking a barnyard +=item How do I flush/unbuffer an output filehandle? Why must I do this? +X X X X -=item The extra parameter of method invocation +=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 Calling a second method to simplify things +=item How do I count the number of lines in a file? +X X X -=item Inheriting the windpipes +=item How can I use Perl's C<-i> option from within a program? +X<-i> X -=item A few notes about @ISA +=item How can I copy a file? +X X -=item Overriding the methods +=item How do I make a temporary file name? +X -=item Starting the search from a different place +=item How can I manipulate fixed-record-length files? +X X -=item The SUPER way of doing things +=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 -=item Where we're at so far... +=item How can I use a filehandle indirectly? +X -=item A horse is a horse, of course of course -- or is it? +=item How can I set up a footer format to be used with write()? +X