Raku / examples

Many examples of Raku code
https://examples.raku.org/
Artistic License 2.0
294 stars 89 forks source link

Update cookbook/01strings/01-00introduction.pl #12

Closed ghost closed 10 years ago

ghost commented 11 years ago

The code: my $string = "1" ~ "1" + 10; will actually output "111" in Perl6.

Since in Perl5, "~" (actually ".") is the same precedence as "+", but in Perl6, numeric operations have higher precedence than string operations. So the "1" + 1 part will be evaluated first, giving "111" as the result.

Just a small modification here. :)