in reply to A Question of style.
Though some smaller bits of code can be formatted like this:if ($x) { if ($y) { code; } code; } else { code; }
Or even this (since this is Perl):if ($x) { code; }
The style of indenting depends primarily on the size of the blocks, imho, though there are some indenting methods I hate:code if $x; long section of code if long test on $x;
Etc. The former produces far too much white space; the latter makes for some real problems lining things up.if ($x) { code; } if ($x) { code; }
|
|---|