Skip to content

Commit fcd6be3

Browse files
committed
Use of fancy quotes in qww refs #2632
1 parent 205c12e commit fcd6be3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/Language/quoting.pod6

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,17 @@ sub compilation-failure (355/113) {}
315315
The C<qw> form of word quoting will treat quote characters literally, leaving
316316
them in the resulting words:
317317
318-
say qw{"a b" c}.perl; # OUTPUT: «("\"a", "b\"", "c")␤»
318+
say qw{"a b" c}.raku; # OUTPUT: «("\"a", "b\"", "c")␤»
319319
320320
Thus, if you wish to preserve quoted sub-strings as single items in the resulting words
321321
you need to use the C<qww> variant:
322322
323-
say qww{"a b" c}.perl; # OUTPUT: «("a b", "c")␤»
323+
say qww{"a b" c}.raku; # OUTPUT: «("a b", "c")␤»
324+
325+
Other kind of quotes are also supported
326+
327+
say qww{ ’this and that’ “here or there” 「infinity and beyond」 }.raku;
328+
# OUTPUT: «("this and that", "here or there", "infinity and beyond")␤»
324329
325330
=head2 X<Word quoting with interpolation: qqw|quote,qqw>
326331

0 commit comments

Comments
 (0)