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.
Copyright © 1998, Tom Christiansen All rights reserved.
Something wrong with this article? Help us out by opening an issue or pull request on GitHub