@@ -42,11 +42,23 @@ L<Num> with value C<3 * 10**8>.
42
42
43
43
= head2 Str
44
44
45
- see the section on quoting constructs below.
45
+ 'a string'
46
+ 'I\'m escaped!'
47
+ "I don't need to be"
48
+ "\"But I still can be,\" he said."
49
+ q|Other delimters can be used too!|
50
+
51
+ String literals are most often created with C < ' > or C < " > , but strings
52
+ are actually a powerful sub-language of Perl 6. See the section on
53
+ quoting constructs below.
46
54
47
55
= head2 Regex
48
56
49
- see the section on quoting constructs below.
57
+ / match some text /
58
+ rx/slurp \s rest (.*) $/
59
+
60
+ These forms produce regex literals. See the section on quoting
61
+ constructs below as well as L < the documentation on regexes|regexes > .
50
62
51
63
= head2 Pair
52
64
@@ -91,8 +103,44 @@ list, or several quoting constructs
91
103
92
104
= head1 Quoting constructs
93
105
106
+ = head2 The Q Lang
107
+
108
+ Quoting constructs make up a sub-language of Perl 6, which are based of
109
+ the simplest form, usable via the shortcut C < 「…」 > , or via C < Q > and any pair of delimiters.
110
+
111
+ Q[A literal string]
112
+ 「More plainly.」
113
+ Q ^Almost any non-word character can be a delimiter!^
114
+
115
+ Delimiters can nested, but in the plain C < Q > form, backslash escapes aren't allowed.
116
+
117
+ Q < Make sure you <match> opening and closing delimiters >
118
+ Q{This is still a closing brace → \}
119
+
120
+ = head3 Backslashes: :q
121
+
122
+ TODO
123
+
124
+ = head3 Interpolation: :qq
125
+
94
126
TODO
95
127
128
+ = head3 Word quoting: :qw
129
+
130
+ TODO
131
+
132
+ = head3 Shell quoting: :qqw
133
+
134
+ TODO
135
+
136
+ = head3 Heredocs: :to
137
+
138
+ TODO
139
+
140
+ = head2 Regexes
141
+
142
+ TODO -- or just point to regexes.pod?
143
+
96
144
= head1 Identifier terms
97
145
98
146
There are built-in identifier terms in Perl 6, which are listed below.
0 commit comments