diff --git a/doc/Language/quoting.pod6 b/doc/Language/quoting.pod6 index 1c1c1f84f..f27c65d4e 100644 --- a/doc/Language/quoting.pod6 +++ b/doc/Language/quoting.pod6 @@ -284,7 +284,7 @@ The angle brackets quoting is like C, but with extra feature that lets you construct L or literals of certain numbers: - say <42 4/2 1e6 1+1i abc>.perl; + say <42 4/2 1e6 1+1i abc>.raku; # OUTPUT: «(IntStr.new(42, "42"), RatStr.new(2.0, "4/2"), NumStr.new(1000000e0, "1e6"), ComplexStr.new(<1+1i>, "1+1i"), "abc")␤» To construct a L«C|/type/Rat» or L«C|/type/Complex» literal, use @@ -351,21 +351,21 @@ Note that variable interpolation happens before word splitting: The C form of word quoting will treat quote characters literally, leaving them in the resulting words: - my $a = 42; say qqw{"$a b" c}.perl; # OUTPUT: «("\"42", "b\"", "c")␤» + my $a = 42; say qqw{"$a b" c}.raku; # OUTPUT: «("\"42", "b\"", "c")␤» Thus, if you wish to preserve quoted sub-strings as single items in the resulting words you need to use the C variant: - my $a = 42; say qqww{"$a b" c}.perl; # OUTPUT: «("42 b", "c")␤» + my $a = 42; say qqww{"$a b" c}.raku; # OUTPUT: «("42 b", "c")␤» Quote protection happens before interpolation, and interpolation happens before word splitting, so quotes coming from inside interpolated variables are just literal quote characters: my $a = "1 2"; - say qqww{"$a" $a}.perl; # OUTPUT: «("1 2", "1", "2")␤» + say qqww{"$a" $a}.raku; # OUTPUT: «("1 2", "1", "2")␤» my $b = "1 \"2 3\""; - say qqww{"$b" $b}.perl; # OUTPUT: «("1 \"2 3\"", "1", "\"2", "3\"")␤» + say qqww{"$b" $b}.raku; # OUTPUT: «("1 \"2 3\"", "1", "\"2", "3\"")␤» =head2 X<<>;quote,« »>>> @@ -375,12 +375,12 @@ functionally equivalent to L). The ASCII equivalent to C<« »> are double angle brackets C«<< >>». # Allomorph Construction - my $a = 42; say « $a b c ».perl; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤» - my $a = 42; say << $a b c >>.perl; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤» + my $a = 42; say « $a b c ».raku; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤» + my $a = 42; say << $a b c >>.raku; # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤» # Quote Protection - my $a = 42; say « "$a b" c ».perl; # OUTPUT: «("42 b", "c")␤» - my $a = 42; say << "$a b" c >>.perl; # OUTPUT: «("42 b", "c")␤» + my $a = 42; say « "$a b" c ».raku; # OUTPUT: «("42 b", "c")␤» + my $a = 42; say << "$a b" c >>.raku; # OUTPUT: «("42 b", "c")␤» =head2 X