This is why we yell, scream, and wave our arms about strict and warnings. With warnings, we get:
$ perl -wle 'my $param = "foo"; if ($param != null) {}' Unquoted string "null" may clash with future reserved word at -e line +1. Argument "null" isn't numeric in numeric ne (!=) at -e line 1. Argument "foo" isn't numeric in numeric ne (!=) at -e line 1.
And with strict we get:
$ perl -Mstrict -wle 'my $param = "foo"; if ($param != null) {}' Bareword "null" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors.
So, tell your coworkers to use strict and warnings unless they know what they're doing. Which, unfortunately, the code you've shown kind of leads me to believe they don't (at least when it comes to Perl).
In reply to Re: The Swiss Army Chainsaw... Watch out for your legs there, buddy!
by revdiablo
in thread The Swiss Army Chainsaw... Watch out for your legs there, buddy!
by crashtest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |