in reply to Turn off warnings, diagnostics?
"Do we turn both "use warnings" and "use diagnostics" OFF (by commenting them out) when the scripts go live?"
I would leave warnings for all environments (development, testing, production, etc.) but only use diagnostics in development (and only then if it's useful - it's certainly not required).
You can always retrieve the additional, verbose diagnostics text by searching perldiag or by running the splain utility.
While it's probably useful to see multiple lines of the form
Use of uninitialized value %s in concatenation (.) or string at ...
it's unlikely that you'll want see the following lengthy explanation of the warning more than once:
(W uninitialized) An undefined value was used as if it were alread
defined. It was interpreted as a "" or a 0, but maybe it was a mi
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl will try to tell y
name of the variable (if any) that was undefined. In some cases it
do this, so it also tells you what operation you used the undefine
in. Note, however, that perl optimizes your program and the opera
displayed in the warning may not necessarily appear literally in y
program. For example, "that $foo" is usually optimized into "that
. $foo, and the warning will refer to the concatenation (.) operat
even though there is no . in your program.