in reply to Re: Abuse of "or next" in expressions and "next" that returns value
in thread Abuse of "or next" in expressions and "next" that returns value

Thank you everyone for answers, now it became more clear. As I understand, every statement in Perl "returns" a value -- rather, it can be evaluated if program flow requires it. The bare "next;" is a statement. What it evaluates to is never necessary to know. The "foo unless bar;" is a statement, too. If "bar" is false, it obviously evaluates to "foo". But if "bar" is true, this whole statement, unexpectedly to me as of yesterday, evaluates to "bar":

>perl -wE "$x=33; say do{42 unless $x}" 33

The (wrong) intuition was that result would be something like "undef". But, if I get RonW's explanation right, the "evaluator" is more straightforward and "primitive" -- it doesn't try to "understand" statement as a whole, but whatever subexpression was evaluated last is taken as result for a whole.