#title Perl Coding Conventions
#author Stefan Hornburg (Racke)
#topics blog
#date 2008-02-18
#pubdate 2008-02-18T12:04:58+01:00
#lang en
- Avoid cuddled else: (} else {)
- Separate keywords with blanks
- Don't seperate functions/variables with blanks
Instead of
if($foo)
{
myfunction ($bar)
} else {
$counter [$i]++;
}
use:
if ($foo) {
myfunction($bar);
}
else {
$counter[$i]++;
}