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.
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. :)