Skip to content

Commit 2b58999

Browse files
authored
Merge pull request #3968 from Raku/heredoc-output
Add output to "multiple heredoc" example
2 parents a253f18 + 30b7bd6 commit 2b58999

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/Language/quoting.pod6

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,9 @@ that line only. Then, until you get an error, add each line in turn.
567567
(Creating a Raku program to do that is left as an exercise for the
568568
reader.)
569569
570-
You can begin multiple Heredocs in the same line.
570+
You can begin multiple Heredocs in the same line. If you do so, the
571+
second heredoc will not start until after the first heredoc has
572+
ended.
571573
572574
=begin code
573575
my ($first, $second) = qq:to/END1/, qq:to/END2/;
@@ -579,6 +581,8 @@ my ($first, $second) = qq:to/END1/, qq:to/END2/;
579581
MULTILINE
580582
STRING
581583
END2
584+
say $first; # OUTPUT: «FIRST␤MULTILINE␤STRING␤»
585+
say $second; # OUTPUT: «SECOND␤MULTILINE␤STRING␤»
582586
=end code
583587
584588
X<|Unquoting>

0 commit comments

Comments
 (0)