You are trying to deturmine the value of an undefined variable... to make sure global variables carry through subroutines, I always DIM or set ($V = "") them at the top of a script with comments on my intended use.
If the variable isn't defined yet, I believe the case would think like:
1. set $var = "one" (since it is a new var).
2. Did it succeed (in setting it to "one")?
3. If so, this case is true.
Hope this helps...
SteveH