Skip to content

Commit 103c365

Browse files
committed
.perl → .raku
1 parent fcd6be3 commit 103c365

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

doc/Language/quoting.pod6

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ The angle brackets quoting is like C<qw>, but with extra feature that lets you
284284
construct L<allomorphs|/language/glossary#index-entry-Allomorph> or literals
285285
of certain numbers:
286286
287-
say <42 4/2 1e6 1+1i abc>.perl;
287+
say <42 4/2 1e6 1+1i abc>.raku;
288288
# OUTPUT: «(IntStr.new(42, "42"), RatStr.new(2.0, "4/2"), NumStr.new(1000000e0, "1e6"), ComplexStr.new(<1+1i>, "1+1i"), "abc")␤»
289289
290290
To construct a L«C<Rat>|/type/Rat» or L«C<Complex>|/type/Complex» literal, use
@@ -351,21 +351,21 @@ Note that variable interpolation happens before word splitting:
351351
The C<qqw> form of word quoting will treat quote characters literally,
352352
leaving them in the resulting words:
353353
354-
my $a = 42; say qqw{"$a b" c}.perl; # OUTPUT: «("\"42", "b\"", "c")␤»
354+
my $a = 42; say qqw{"$a b" c}.raku; # OUTPUT: «("\"42", "b\"", "c")␤»
355355
356356
Thus, if you wish to preserve quoted sub-strings as single items in the
357357
resulting words you need to use the C<qqww> variant:
358358
359-
my $a = 42; say qqww{"$a b" c}.perl; # OUTPUT: «("42 b", "c")␤»
359+
my $a = 42; say qqww{"$a b" c}.raku; # OUTPUT: «("42 b", "c")␤»
360360
361361
Quote protection happens before interpolation, and interpolation happens
362362
before word splitting, so quotes coming from inside interpolated variables are
363363
just literal quote characters:
364364
365365
my $a = "1 2";
366-
say qqww{"$a" $a}.perl; # OUTPUT: «("1 2", "1", "2")␤»
366+
say qqww{"$a" $a}.raku; # OUTPUT: «("1 2", "1", "2")␤»
367367
my $b = "1 \"2 3\"";
368-
say qqww{"$b" $b}.perl; # OUTPUT: «("1 \"2 3\"", "1", "\"2", "3\"")␤»
368+
say qqww{"$b" $b}.raku; # OUTPUT: «("1 \"2 3\"", "1", "\"2", "3\"")␤»
369369
370370
=head2 X<<<Word quoting with interpolation and quote protection: « »|quote,<< >>;quote,« »>>>
371371
@@ -375,12 +375,12 @@ functionally equivalent to L<qq:ww:v|#index-entry-:val_(quoting_adverb)>). The
375375
ASCII equivalent to C<« »> are double angle brackets C«<< >>».
376376
377377
# Allomorph Construction
378-
my $a = 42; say « $a b c ».perl; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤»
379-
my $a = 42; say << $a b c >>.perl; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤»
378+
my $a = 42; say « $a b c ».raku; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤»
379+
my $a = 42; say << $a b c >>.raku; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤»
380380
381381
# Quote Protection
382-
my $a = 42; say « "$a b" c ».perl; # OUTPUT: «("42 b", "c")␤»
383-
my $a = 42; say << "$a b" c >>.perl; # OUTPUT: «("42 b", "c")␤»
382+
my $a = 42; say « "$a b" c ».raku; # OUTPUT: «("42 b", "c")␤»
383+
my $a = 42; say << "$a b" c >>.raku; # OUTPUT: «("42 b", "c")␤»
384384
385385
=head2 X<Shell quoting: qx|quote,qx>
386386

0 commit comments

Comments
 (0)