Section B.4. Chapter 5, Variables


B.4. Chapter 5, Variables

  • Avoid using non-lexical variables. [Lexical Variables]

  • Don't use package variables in your own development. [Package Variables]

  • If you're forced to modify a package variable, localize it. [Localization]

  • Initialize any variable you localize. [Initialization]

  • use English for the less familiar punctuation variables. [Punctuation Variables]

  • If you're forced to modify a punctuation variable, localize it. [Localizing Punctuation Variables]

  • Don't use the regex match variables. [Match Variables]

  • Beware of any modification via $_. [Dollar-Underscore]

  • Use negative indices when counting from the end of an array. [Array Indices]

  • Take advantage of hash and array slicing. [Slicing]

  • Use a tabular layout for slices. [Slice Layout]

  • Factor large key or index lists out of their slices. [Slice Factoring]



Perl Best Practices
Perl Best Practices
ISBN: 0596001738
EAN: 2147483647
Year: 2004
Pages: 350
Authors: Damian Conway

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net