in reply to Re^2: Evaluating the condition ($x ||= $y)
in thread Evaluating the condition ($x)

say $x ? "true" : "false";

And it's called the conditional operator. It is merely a ternary operator, just like addition operator is a binary operator. It not even Perl's only ternary operator.

Replies are listed 'Best First'.
Re^4: Evaluating the condition ($x ||= $y)
by Anonymous Monk on Aug 26, 2024 at 09:31 UTC
    It not even Perl's only ternary operator.

    ???

      While it's Perl only infix ternary operators, Perl has circumfix ternary operators. dbmopen, for one.

      I would argue that the substitution and translate operators have three operands as well (pattern, replacement and flags).