On Thu, Jul 29, 2010 at 8:30 PM, R. Dresens <chrom...@nedlinux.nl> wrote:

> 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?

I think that you meant to do is this:

    my $x = [3, 4]; my @y = 1, 2, @($x), 5, 6; say @y.perl; # untested

Leon

Reply via email to