Peter Scott writes:
> can someone tell me why you can't just use && ... || in place of ??
> ... !!, now that && and || propagate context to both sides?

You get the wrong result when the antecedent is true and the consequent is
false:

  my $a = 1 ?? 0 !! 42;
  # Now $a is 0

  my $b = 1 && 0 || 42;
  # Now $b is 17

-- 
Aaron Crane

Reply via email to