.. which would otherwise do the wrong thing for a filename such as "0".Umm, perhaps I'm being too picky, but I think that was a flawed example.
would evaluate correctly, regardless of the actual filename.defined($filename) && length($filename)
Now, if you tried just $filename as the return value, that would be problematic...
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re^3: Converting to boolean
by QM
in thread Converting to boolean
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |