in reply to Re: unless....else
in thread unless....else
When I see unless (cond) {code} else {other code}, something wierd happens in my head. I know it works, I know what it does, but I can't get what's happening unless I mentally make it if (not cond) {code} else {other code}. Call me crazy (you won't be the first), but that's how my mind works. (Does this just mean I'm getting old?)
So since I'm going to do this in my head anyhow, that's how I write it.
What's strange is that I use it in modifiers all the time, e.g. next unless $_;. No problem for me here.
--Bob Niederman, http://bob-n.com
|
---|