in reply to To return and/or not?
BrowserUk is spot on. Just by wrapping the expression in parenthesis, you'll get the same results from both functions:
sub c2 { my ($a, $b) = @_; return ($a and not $b) }
I went down a rabbit hole and was playing with Devel::Peek and trying to find clues as to why the returned values were different. Oh, well...
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|