Boolean values


In Perl there is no special True and False values. Any value can be checked for True-ness. The following values are considered to be False:


undef
0        # the number 0.
''       # empty string.
'0'      # a string with a single 0 in it.

Everything else is considered to be True.