Why Perl programs should always 'use strict'

Yes, every Perl programmer knows that you should 'use strict', but sometimes it's just easier not to. BUT YOU SHOULD ALWAYS DO IT ANYWAY. I just spent an hour debugging a bit of existing code where I added a bit of fork/waitpid code (copy/pasted from elsewhere) to implement concurrent child processing. And because 'use strict' wasn't on in (not my fault, the original code isn't mine), and I didn't add use POSIX ":sys_wait_h"; at the start, the WNOHANG constant wasn't defined. So perl just said "ok, I'll make that 0". Which means that my waitpid that was supposed to not hang, did indeed hang, so my concurrency code failed miserably to be concurrent. This makes me grumpy.

It's not the first time a lack of 'use strict' has bitten me, and it's highly unlikely to be the last. But I'm grumpy enough to rant about it today. Grrrr.

'use strict' is not hard to use and it doesn't break things; on the contrary it avoids breakage at unexpected moments. It is the epitome of "Principle of Least Surprise".

'use strict': it's not just a good idea, it's the law (at least it is anywhere I'm in Law Enforcement).