You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also called X<ternary operator|operator,ternary> or X<conditional operator|operator,conditional>.
2025
-
2026
-
C<$condition ?? $true !! $false> evaluates C<$condition> and returns the expression right behind ??, in this case C<$true> if it is C<True>, otherwise evaluates and returns the expression behind !!, C<$false> in this case.
2026
+
Also called I<ternary> or I<conditional> operator. C<$condition ?? $true !!
2027
+
$false> evaluates C<$condition> and returns the expression right behind ??,
2028
+
in this case C<$true> if it is C<True>, otherwise evaluates and returns
2029
+
the expression behind !!, C<$false> in this case.
2027
2030
2031
+
X<|operator,flipflop>
2028
2032
=head2infix C«ff»
2029
2033
2030
2034
sub infix:<ff>(Mu $a, Mu $b)
2031
2035
2032
-
Also called the X<flipflop operator|ff>.
2036
+
Also called the I<flipflop operator>.
2033
2037
2034
-
Compares both arguments to C<$_> (that is, C<$_ ~~ $a> and C<$_ ~~
2035
-
$b>). Evaluates to C<False> until the left-hand smartmatch is C<True>, at which
2036
-
point it evaluates to C<True> until the right-hand smartmatch is C<True>.
2038
+
Compares both arguments to C<$_> (that is, C<$_ ~~ $a> and C<$_ ~~ $b>).
2039
+
Evaluates to C<False> until the left-hand smartmatch is C<True>, at
2040
+
which point it evaluates to C<True> until the right-hand smartmatch is
2041
+
C<True>.
2037
2042
2038
-
In effect, the left-hand argument is the "start" condition and the right-hand
2039
-
is the "stop" condition. This construct is typically used to pick up only a
2040
-
certain section of lines. For example:
2043
+
In effect, the left-hand argument is the "start" condition and the
2044
+
right-hand is the "stop" condition. This construct is typically used to
2045
+
pick up only a certain section of lines. For example:
2041
2046
2042
2047
=begincode :allow<B V>
2043
2048
my $excerpt = q:to/END/;
@@ -2058,9 +2063,9 @@ my @codelines = gather for $excerpt.lines {
2058
2063
say @codelines.join("\n");
2059
2064
=endcode
2060
2065
2061
-
After matching the start condition, the operator will then match the same C<$_>
2062
-
to the stop condition and act accordingly if successful. In this example, only
2063
-
the first element is printed:
2066
+
After matching the start condition, the operator will then match the
2067
+
same C<$_>to the stop condition and act accordingly if successful. In
0 commit comments