perltrap

Perl traps for the unwary 

Miscellaneous Information


DESCRIPTION

The biggest trap of all is forgetting to use the -w switch; see perlrun. The second biggest trap is not making your entire program runnable under use strict. The third biggest trap is not reading the list of changes in this version of Perl; see perldelta.

Awk Traps

Accustomed awk users should take special note of the following:

C Traps

Cerebral C programmers should take note of the following:

Sed Traps

Seasoned sed programmers should take note of the following:

Shell Traps

Sharp shell programmers should take note of the following:

Perl Traps

Practicing Perl Programmers should take note of the following:

Perl4 to Perl5 Traps

Practicing Perl4 Programmers should take note of the following Perl4-to-Perl5 specific traps.

They're crudely ordered according to the following list:

Discontinuance, Deprecation, and BugFix traps 

Anything that's been fixed as a perl4 bug, removed as a perl4 feature or deprecated as a perl4 feature with the intent to encourage usage of some other perl5 feature.

Parsing Traps 

Traps that appear to stem from the new parser.

Numerical Traps 

Traps having to do with numerical or mathematical operators.

General data type traps 

Traps involving perl standard data types.

Context Traps - scalar, list contexts 

Traps related to context within lists, scalar statements/declarations.

Precedence Traps 

Traps related to the precedence of parsing, evaluation, and execution of code.

General Regular Expression Traps using s///, etc. 

Traps related to the use of pattern matching.

Subroutine, Signal, Sorting Traps 

Traps related to the use of signals and signal handlers, general subroutines, and sorting, along with sorting subroutines.

OS Traps 

OS-specific traps.

DBM Traps 

Traps specific to the use of dbmopen(), and specific dbm implementations.

Unclassified Traps 

Everything else.

If you find an example of a conversion trap that is not listed here, please submit it to Bill Middleton <wjm@best.com> for inclusion. Also note that at least some of these can be caught with the use warnings pragma or the -w switch.

Discontinuance, Deprecation, and BugFix traps

Anything that has been discontinued, deprecated, or fixed as a bug from perl4.

Parsing Traps

Perl4-to-Perl5 traps from having to do with parsing.

Numerical Traps

Perl4-to-Perl5 traps having to do with numerical operators, operands, or output from same.

General data type traps

Perl4-to-Perl5 traps involving most data-types, and their usage within certain expressions and/or context.

Context Traps - scalar, list contexts

Precedence Traps

Perl4-to-Perl5 traps involving precedence order.

Perl 4 has almost the same precedence rules as Perl 5 for the operators that they both have. Perl 4 however, seems to have had some inconsistencies that made the behavior differ from what was documented.

General Regular Expression Traps using s///, etc.

All types of RE traps.

Subroutine, Signal, Sorting Traps

The general group of Perl4-to-Perl5 traps having to do with Signals, Sorting, and their related subroutines, as well as general subroutine traps. Includes some OS-Specific traps.

OS Traps

Interpolation Traps

Perl4-to-Perl5 traps having to do with how things get interpolated within certain expressions, statements, contexts, or whatever.

DBM Traps

General DBM traps.

Unclassified Traps

Everything else.

As always, if any of these are ever officially declared as bugs, they'll be fixed and removed.


AVAILABILITY

MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS AlertCentre


SEE ALSO

Commands:
perl

Miscellaneous:
perl5004delta, perl5005delta, perlapi, perlapio, perlbook, perlboot, perlbot, perlcall, perlcom, perlcompile, perldata, perldbmfilter, perldebguts, perldebug, perldelta, perldiag, perldsc, perlembed, perlfaq, perlfaq1, perlfaq2, perlfaq3, perlfaq4, perlfaq5, perlfaq6, perlfaq7, perlfaq8, perlfaq9, perlfilter, perlfork, perlform, perlfunc, perlguts, perlhack, perlhist, perlipc, perllexwarn, perllol, perlmod, perlmodinstall, perlmodlib, perlnumber, perlobj, perlop, perlopentut, perlpod, perlport, perlre, perlref, perlreftut, perlsec, perlsock, perlstyle, perlsub, perlsyn, perlthrtut, perltie, perltodo, perltoot, perltootc, perlunicode, perlvar, perlxs, perlxstut, win32