in reply to Avoiding the == blues
Of course this won't catch cases where the if and conditional are not on the same line, or constructs such as:perl -ne'if(m/if\s*\(.+?=[^~].+?\)/){print "Possible use of = instead +of == in line $.\n"}' script.pl
Covering more cases will require a full blown script... or perhaps a new CPAN module :-)something() if $var1 = $var2;
|
|---|