Quoting OP yet again (emphasis is mine) ...
Always having to check if the variable is defined before testing its value. It just seems soooo unnecessarily verbose.
I, personally, do get your point, and (would) have added the defined test myself.
The urge to silence the uninitialized variable warnings becomes rather strong (in most limited scope, of course), however, when more than a couple of defined tests exists in close proximity just to avoid the damned warnings. Yes, that does prompt me to check why the things are not defined, which sometimes results in anything fruitful.
But really, equality comparison of an undefined variable to anything else should just merrily produce the darned truth value without fuss.
In reply to Re^5: complaint: always testing defined()
by parv
in thread complaint: always testing defined()
by RaptorRex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |