in reply to Re^2: Grokking Compile Error Messages
in thread Grokking Compile Error Messages
if ( ( $flag1 or $flag2 ) and ( length( $string ) )
This is where lining up your delimiters makes a lot of sense. Had you lined up the interior parens, giving
the unbalanced leading paren would be a bit more obvious; in fact,if ( ( $flag1 or $flag2 ) and ( length( $string ) )
might be even better: the if's leading paren isn't "masked" by the and.if ( ( $flag1 or $flag2 ) and ( length( $string ) )
In this case, though, I'd be sorely tempted to break the if's condition out into a small sub with a meaningful name. I think
is plenty readable, and gives you less punctuation to worry about.if ( &condition( $flag1, $flag2, $string ) )
--
F
o
x
t
r
o
t
U
n
i
f
o
r
m
Found a typo in this node? /msg me
% man 3 strfry
|
|---|