Skip to content

Commit 1af00c4

Browse files
committed
minor change to separate output notes
Based on 4acd2ad#commitcomment-167222550
1 parent ab2d66b commit 1af00c4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

doc/Language/operators.rakudoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3433,10 +3433,13 @@ L<C<Failure>|/type/Failure>s are never defined, so you can handle them with
34333433
this operator).
34343434

34353435
"does this match?" ~~ /this/ andthen {
3436-
$_.say # Using explicit $_ here only for clarity, .say works too
3437-
}
3438-
"does that match?" ~~ /this/ andthen say 'oops';
3439-
# OUTPUT: «this␤»
3436+
.put;
3437+
my $thing-to-do-if-match-succeeds;
3438+
...
3439+
} # OUTPUT: «this␤»
3440+
3441+
"does that match?" ~~ /this/ andthen put 'oops';
3442+
# NO OUTPUT
34403443

34413444
The C<andthen> operator is a close relative of the L«C<with> statement
34423445
modifier|/language/control#with_orwith_without», and some compilers

0 commit comments

Comments
 (0)