X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperltoc.pod;h=6878ef8a555dc2bf73f1455f15d7b98014c0552b;hb=84d78eb7303a2024a7c31dbf1ef17c1815e84d3c;hp=5595bda82d068e18e8694f5c5d79d5139091f1a6;hpb=f262848d51493a3e2e294087f9971a5544bee221;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 5595bda..6878ef8 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -157,18 +157,25 @@ arrays of arrays, hashes of arrays, arrays of hashes, hashes of hashes, more elaborate constructs =item REFERENCES +X X X X =item COMMON MISTAKES =item CAVEAT ON PRECEDENCE +X X =item WHY YOU SHOULD ALWAYS C =item DEBUGGING +X X +X X X X +X X +X X =item CODE EXAMPLES =item ARRAYS OF ARRAYS +X X =over 4 @@ -181,6 +188,7 @@ more elaborate constructs =back =item HASHES OF ARRAYS +X X =over 4 @@ -193,6 +201,7 @@ more elaborate constructs =back =item ARRAYS OF HASHES +X X =over 4 @@ -205,6 +214,7 @@ more elaborate constructs =back =item HASHES OF HASHES +X X =over 4 @@ -217,6 +227,7 @@ more elaborate constructs =back =item MORE ELABORATE RECORDS +X X X =over 4 @@ -673,54 +684,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 @@ -765,8 +806,8 @@ LIMIT specified =back -=head2 perlfaq - frequently asked questions about Perl ($Date: 2003/01/31 -17:37:17 $) +=head2 perlfaq - frequently asked questions about Perl ($Date: 2005/12/30 +15:04:07 $) =over 4 @@ -829,8 +870,8 @@ Interaction, perlfaq9 - Networking =back -=head2 perlfaq1 - General Questions About Perl ($Revision: 1.14 $, $Date: -2003/11/23 08:02:29 $) +=head2 perlfaq1 - General Questions About Perl ($Revision: 1.19 $, $Date: +2005/12/31 00:54:37 $) =over 4 @@ -844,7 +885,7 @@ Interaction, perlfaq9 - Networking =item Which version of Perl should I use? -=item What are perl4 and perl5? +=item What are perl4, perl5, or perl6? =item What is Ponie? @@ -878,8 +919,8 @@ Scheme, or Tcl? =back -=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.25 $, -$Date: 2003/10/16 04:57:38 $) +=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.38 $, +$Date: 2005/12/31 00:54:37 $) =over 4 @@ -887,13 +928,13 @@ $Date: 2003/10/16 04:57:38 $) =over 4 -=item What machines support Perl? Where do I get it? +=item What machines support perl? Where do I get it? -=item How can I get a binary version of Perl? +=item How can I get a binary version of perl? -=item I don't have a C compiler on my system. How can I compile perl? +=item I don't have a C compiler. How can I build my own Perl interpreter? -=item I copied the Perl binary from one machine to another, but scripts +=item I copied the perl binary from one machine to another, but scripts don't work. =item I grabbed the sources and tried to compile but gdbm/dynamic @@ -922,7 +963,7 @@ References, Tutorials, Task-Oriented, Special Topics =item Archives of comp.lang.perl.misc -=item Where can I buy a commercial version of Perl? +=item Where can I buy a commercial version of perl? =item Where do I send bug reports? @@ -934,8 +975,8 @@ References, Tutorials, Task-Oriented, Special Topics =back -=head2 perlfaq3 - Programming Tools ($Revision: 1.37 $, $Date: 2003/11/24 -19:55:50 $) +=head2 perlfaq3 - Programming Tools ($Revision: 1.56 $, $Date: 2005/12/31 +00:54:37 $) =over 4 @@ -963,9 +1004,10 @@ References, Tutorials, Task-Oriented, Special Topics =item Is there an IDE or Windows Perl Editor? -Komodo, The Object System, Open Perl IDE, PerlBuilder, visiPerl+, OptiPerl, -GNU Emacs, MicroEMACS, XEmacs, Jed, Elvis, Vile, Vim, Codewright, -MultiEdit, SlickEdit, Bash, Ksh, Tcsh, Zsh, BBEdit and BBEdit Lite, Alpha +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 Where can I get Perl macros for vi? @@ -975,8 +1017,6 @@ MultiEdit, SlickEdit, Bash, Ksh, Tcsh, Zsh, BBEdit and BBEdit Lite, Alpha =item How can I use X or Tk with Perl? -=item How can I generate simple menus without using CGI or Tk? - =item How can I make my Perl program run faster? =item How can I make my Perl program take less memory? @@ -1006,10 +1046,10 @@ stringification, Pass by reference, Tie large variables to disk =item Where can I learn about object-oriented Perl programming? -=item Where can I learn about linking C with Perl? [h2xs, xsubpp] +=item Where can I learn about linking C with Perl? -=item I've read perlembed, perlguts, etc., but I can't embed perl in -my C program; what am I doing wrong? +=item I've read perlembed, perlguts, etc., but I can't embed perl in my C +program; what am I doing wrong? =item When I tried to run my script, I got this message. What does it mean? @@ -1021,8 +1061,8 @@ my C program; what am I doing wrong? =back -=head2 perlfaq4 - Data Manipulation ($Revision: 1.54 $, $Date: 2003/11/30 -00:50:08 $) +=head2 perlfaq4 - Data Manipulation ($Revision: 1.73 $, $Date: 2005/12/31 +00:54:37 $) =over 4 @@ -1145,8 +1185,6 @@ the tag =item How can I remove duplicate elements from a list or array? -a), b), c), d), e) - =item How can I tell whether a certain element is contained in a list or array? @@ -1240,8 +1278,8 @@ array of hashes or arrays? =back -=head2 perlfaq5 - Files and Formats ($Revision: 1.30 $, $Date: 2003/11/23 -08:07:46 $) +=head2 perlfaq5 - Files and Formats ($Revision: 1.42 $, $Date: 2005/12/31 +00:54:37 $) =over 4 @@ -1250,83 +1288,120 @@ array of hashes or arrays? =over 4 =item How do I flush/unbuffer an output filehandle? Why must I do this? +X X X X =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 How do I count the number of lines in a file? +X X X =item How can I use Perl's C<-i> option from within a program? +X<-i> X + +=item How can I copy a file? +X X =item How do I make a temporary file name? +X =item How can I manipulate fixed-record-length files? +X X =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 How can I use a filehandle indirectly? +X =item How can I set up a footer format to be used with write()? +X