Hello, I've been experimenting with Perl 6 for quite a while, and so now and then I upgrade my Rakudo installation. Today, I upgraded to Rakudo star.
I have some issues with the behavior related to array references and their actual replacements known as "captures" (as far as I'm correct). Suppose that I do this: my $x = [3, 4]; my @y = 1, 2, $x, 5, 6; say @y.perl; Then I'll get `[1, 2, [3, 4], 5, 6]`, but if I do this... my @x = (3, 4); my @z = 1, 2, \...@x, 5, 6; say @z.perl; ...then, some time ago, I got `[1, 2, [3, 4], 5, 6]`; ...but nowadays I get `[1, 2, \(3, 4), 5, 6]`. I expected the behavior from some time ago, actually. Is that wrong? `...@y[2].what` results in 'Array()', `...@z[2].what` results in 'Capture()' ...but are they really different in behavior? Are there any caveats? If so, what is the proper way to get the "old" behavior? Is that even necessary? And what about this?... my $x = [3, 4]; my @y = 1, 2, |$x, 5, 6; say @y.perl; ...I actually expected `[1, 2, 3, 4, 5, 6]`, since I was under the impression that the '|' was some kind of "flatten" or "interpolation" operator. But I got `[1, 2, \(3, 4), 5, 6]` instead. How can I do this? Is this normal behavior? I find this confusing, but perhaps there is some deeper hidden meaning? Perhaps it is language nit-picking, but I'm really curious. Thanks, Greetings, Raymond.