I like the if ( 0 == $foo ) construct over if ( $foo == 0 ) because the s/==/=/ typo is an error in the first but not the second.
Can't modify constant item in scalar assignment
I'd rather have that than some mere warning.
In reply to Re^3: Avoiding silly programming mistakes
by kyle
in thread Avoiding silly programming mistakes
by missingthepoint
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |