in reply to Re: Re: variable set to 0 ? 0 : 1
in thread variable set to 0 ? 0 : 1

I agree with sauoq.

But here's how I usually write the ternary operator when clarity is a goal:

return $status == 0 ? 0 : 1;
Yes, it seems unnecessarily expansive for this simple case... but I probably wouldn't do it for this simple case.

I would, and do, do this for situations such as:

return @things = $obj->get_current_list_of_things() ? grep /$wanted/, @things : $obj->default_things; # o.k., it's a contrived example. gimme a break.
Predicate and two lemmas, each on its own line.