x puts (1,2) array in scalar context, that's why you have "1 2" string repeated 10 times.
try xx operator, it works in array context
$ perl6 -e 'say join("|", (1,2) xx 10)'
1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
bbkr
On 10 Feb 2014, at 14:19, Kamil Kułaga <[email protected]> wrote:
> Hi,
>
> I've played wit x and xx repetition operators and found interesting result
> using
> rakudo star:
>
>> join("|", (1,2) x 10)
> 1 21 21 21 21 21 21 21 21 21 2
>
> Is this ok? If true please explain this to me :) Because I
> expected 12121212121212121212 or 12|12|12|12|12|12|12|12|12|12
>
> PS. perl6 --version
> This is perl6 version 2014.01 built on parrot 5.9.0 revision 0
>
> --
> Regards
>
> Kamil Kułaga
>
smime.p7s
Description: S/MIME cryptographic signature
