Documentation for routine ||

Documentation for routine ||, assembled from the following types:

language documentation Operators

From Operators

(Operators) prefix ||

TODO

language documentation Operators

From Operators

(Operators) infix ||

Returns the first argument that evaluates to True in boolean context, or otherwise the last argument.

Note that this short-circuits, i.e. if one of the arguments evaluates to a true value, the arguments to the right of are never evaluated.

sub a { 0 }
sub b { 1 }
sub c { die "never called" };
say a() || b() || c();      # OUTPUT: «1␤»