Damian Conway <[EMAIL PROTECTED]> writes:

> Colin exemplifies:
>  
>    > $a = 1;
>    > @a = (1);
>    > @b = (1, 2, 3);
>    > @c = (4, 5, 6);
>    > 
>    > $a = $a ^+ @b;
>    > @a = @a ^+ @b;
>    > 
>    > print $a;  # 7
> 
> No. It will (probably) print: 4. Because:
>    
>       $a = $a ^+ @b;
> 
> becomes:
> 
>       $a = ($a,$a,$a) ^+ @b;
> 
> which is:
> 
>       $a = (1,1,1) ^+ (1,2,3);
> 
> becomes:
> 
>       $a = (2,3,4);
> 
> which is:
> 
>       $a = 4;

Hmm... I thought that

$a = $a ^+ @b 

becomes:

$a = [$a, $a, $a] ^+ [1, 2, 3]
$a = [1, 1, 1] ^+ [1, 2, 3]
$a = [2, 3, 4]

Or am I mistaken about the new perl6 syntax for 

$a = @b;

Or does the hyper operator 'listify' the stuff it's working on?

-- 
Piers

Reply via email to