The Perl Conference Salt Lake City 2018 Banner

Perl Style: From Perlstyle (part 1)

  • 4-column indent. Make your editor help you! [DEMO]
  • Opening curly on same line as keyword, if possible; otherwise line up.
  • Space before the opening curly of a multi-line BLOCK.
  • One-line BLOCK may be put on one line, including curlies.
  • No space before the semicolon.
  • Semicolon omitted in `short’ one-line BLOCK.
  • Space around most operators.
  • Space around a `complex’ subscript (inside brackets).
  • Blank lines between chunks that do different things.
  • Uncuddled elses.

Forward to From Perlstyle (part 2)
Back to Patches
Up to index

Copyright © 1998, Tom Christiansen All rights reserved.

Tags

Feedback

Something wrong with this article? Help us out by opening an issue or pull request on GitHub