Careful! Many things are false in Perl, like 0 or ""
Oh yes - care is needed. But very often that's exactly what I want.
A common use case is query strings from HTML forms with checkboxes. The query string will have the key with no value. So if that's decoded into a Perl hash, the hash will be defined and the key exists but I want it to return false as it is an empty string.
In reply to Re^4: Conditional initialization of my-variables
by Bod
in thread Conditional initialization of my-variables
by muthm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |