NAME

perltrap - Perl traps for the unwary


DESCRIPTION

The biggest trap of all is forgetting to use the -w switch; see the perlrun manpage. 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 the perldelta manpage.


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 -w.


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.


DISCLAIMER

We are painfully aware that these documents may contain incorrect links and misformatted HTML. Such bugs lie in the automatic translation process that automatically created the hundreds and hundreds of separate documents that you find here. Please do not report link or formatting bugs, because we cannot fix per-document problems. The only bug reports that will help us are those that supply working patches to the installhtml or pod2html programs, or to the Pod::HTML module itself, for which I and the entire Perl community will shower you with thanks and praises.

If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.

--Tom Christiansen, Perl Documentation Compiler and Editor


Return to the Perl Documentation Index.
Return to the Perl Home Page.