http://www.perlmonks.org?node_id=367662


in reply to Converting to boolean

My first reaction was: Why would one want do do that? Any value will act as a boolean if used in a boolean context.

But I note that this question has been posed and answered by experienced monks who give every indication of taking this matter quite seriously.

So clearly I'm missing something. I've never been aware of a need for this. Could someone offer a few cases where converting to such a "boolean" value is better than simply using the variable as-is in a boolean context.

------------------------------------------------------------
"Perl is a mess and that's good because the
problem space is also a mess.
" - Larry Wall