That's a C thing; that is, a practise that was used among C programmers long before Perl programmers started coding.
It's not really necessary to do so in Perl; with warnings on, if you mistake the operator, Perl will warn (Found = in conditional, should be == at ...). I think some C compilers (like gcc) will warn if you have an assignment in a conditional as well; which can be disabled by using an additional set of parenthesis.
In reply to Re^2: Avoiding silly programming mistakes
by JavaFan
in thread Avoiding silly programming mistakes
by missingthepoint
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |