File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -162,25 +162,31 @@ $n < 1; # Perl 6
162
162
163
163
= end item
164
164
165
- However, note that you can use L < unspace|https://design.perl6.org/S02.html#Unspaces >
166
- to add whitespace in Perl 6 code in places where it is otherwise not
167
- allowed:
165
+ = begin item
166
+ I < However, whitespace is allowed before the period of a method call! >
168
167
169
168
= for code :lang<perl5>
170
169
# Perl 5
171
- my @books = $xml->parse_file($file) # some comment
172
- ->findnodes("/library/book");
170
+ my @books = $xml
171
+ ->parse_file($file) # some comment
172
+ ->findnodes("/library/book");
173
173
174
174
= for code :preamble<no strict;>
175
175
# Perl 6
176
- my @books = $xml.parse-file($file)\ # some comment
177
- .findnodes("/library/book");
176
+ my @books = $xml
177
+ .parse-file($file) # some comment
178
+ .findnodes("/library/book");
179
+
180
+ = end item
181
+
182
+ However, note that you can use L < unspace|https://design.perl6.org/S02.html#Unspaces >
183
+ to add whitespace in Perl 6 code in places where it is otherwise not
184
+ allowed.
178
185
179
186
See also L < S03#Minimal whitespace DWIMmery|https://design.perl6.org/S03.html#Minimal_whitespace_DWIMmery > and
180
187
L < S04#Statement parsing|https://design.perl6.org/S04.html#Statement_parsing >
181
188
in the Perl 6 design docs.
182
189
183
-
184
190
= head2 Sigils
185
191
186
192
In Perl 5, arrays and hashes use changing sigils depending on how they are
You can’t perform that action at this time.
0 commit comments