in reply to Tracking down uninitialized values...

I have seen a lot of examples where the programmer created this problem by not checking return values. He does a call to a system function or a module function then uses the return value without testing for undef or false. These errors can propagate quite a ways through the code through various regexes and other manipulations. No, I don't know of any automated way of checking this. You need to check the documentation for each call for possible return values. Defensive programming is the word here. Every call returning a string or reference should be checked for both undef and null.


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}