Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] multiple heredoc beginning in the same line

5 views
Skip to first unread message

fran...@avalenn.eu

unread,
Nov 30, 2016, 8:45:02 PM11/30/16
to perl6-l...@perl.org
This is to document the fact that, as in POSIX shell, you can use
multiple HEREDOC strings in the same line.

---
doc/Language/quoting.pod6 | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/doc/Language/quoting.pod6 b/doc/Language/quoting.pod6
index f7fe658..393807b 100644
--- a/doc/Language/quoting.pod6
+++ b/doc/Language/quoting.pod6
@@ -386,6 +386,20 @@ would produce:
file "db.7.3.8";
};

+You can begin multiple Heredocs in the same line.
+
+=begin code
+my ($first, $second) = qq:to/END1/, qq:to/END2/;
+ FIRST
+ MULTILINE
+ STRING
+ END1
+ SECOND
+ MULTILINE
+ STRING
+ END2
+=end code
+
=head1 Regexes

For information about quoting as applied in regexes see the L<regular
--
2.9.3
0 new messages