in reply to Re^4: Breaking The Rules
in thread Breaking The Rules

Regardless of when/how you make $var = $some_resonable_default, immediately prior to you giving it a default value, it was legitimately undefined for reasons beyone your control. i.e. Just prior to evaluating the RHS of ||, $var was undefined and you had no control over it.

Replies are listed 'Best First'.
Re^6: Breaking The Rules
by adrianh (Chancellor) on Jun 04, 2006 at 09:13 UTC
    Just prior to evaluating the RHS of ||, $var was undefined and you had no control over it.

    I think the larger point that was being made was that it's a computer program; you always have control, because you can see all the situations where things might become undef. If your variables have short scope (as they should have) then it's easy to deal with the situations where undef should be changed to $some_default.

      I'm either missing your point, or your missing my point. Simply put, my point is: The fact that the input is bad can not be controled by your program. What you do with bad input can be.