Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Truth and Falsehoodby ikegami (Patriarch) |
on Aug 18, 2019 at 06:29 UTC ( [id://11104632]=note: print w/replies, xml ) | Need Help?? |
When's the last time you did if (()) {}? Why would you ever do that? I suppose one could use sub f { return (); } if (f()) {}, but that's a very bad practice. (A sub that's expected to return a scalar should do so even in list context.) So I'm rather baffled as to why this was mentioned. There are so many operators that can return false that would merit a mention before (), such as scalar assignment, list assignment, grep, map, m// and s///.
In Section
Meditations
|
|