syntax << >>

Documentation for syntax << >> assembled from the following types:

language documentation Quoting constructs

From Quoting constructs

(Quoting constructs) quote << >> << >>

This style of quoting is like qqww, but with the added benefit of constructing allomorphs (making it functionally equivalent to qq:ww:v). The ASCII equivalent to « » are double angle brackets << >>.

# Allomorph Construction 
my $a = 42say «  $a b c    ».raku;  # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤» 
my $a = 42say << $a b c   >>.raku;  # OUTPUT: «(IntStr.new(42, "42"), "b", "c")␤» 
 
# Quote Protection 
my $a = 42say «  "$a b" c  ».raku;  # OUTPUT: «("42 b", "c")␤» 
my $a = 42say << "$a b" c >>.raku;  # OUTPUT: «("42 b", "c")␤»