Re: Strange variable behaviour

2008-06-22 Thread Frederik Schwarzer
On Monday 23 June 2008 00:19:14 Moritz Lenz wrote: > Will Coleda wrote: Hi, > > Which implementation of Perl 6 are you using here? In Rakudo, > > everything works as you describe except for the last example which > > dies on the last line with: Erm, totally forgot that. I am using a recent (rea

[PATCH] Re: Strange variable behaviour

2008-06-22 Thread Moritz Lenz
Moritz Lenz wrote: > Will Coleda wrote: >> On Sun, Jun 22, 2008 at 2:59 PM, Frederik Schwarzer >> <[EMAIL PROTECTED]> wrote: ... >>> But if I do: >>>my @arr = (23, 42); >>>my $temp = @arr[0]; # copy? >>>@arr[0] = @arr[1]; >>>say $temp; # 42 >>> $temp is 42 ... >>> I expected $te

Re: Strange variable behaviour

2008-06-22 Thread Moritz Lenz
Will Coleda wrote: > On Sun, Jun 22, 2008 at 2:59 PM, Frederik Schwarzer > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> there is something I do not understand. >> I reduced the code to a minimal case. >> >> If I do: >>my $a = 23; >>my $b = $a; # copy >>$a = 42; >>say $b; # 23 >> $b i

Re: Strange variable behaviour

2008-06-22 Thread Will Coleda
On Sun, Jun 22, 2008 at 2:59 PM, Frederik Schwarzer <[EMAIL PROTECTED]> wrote: > Hi, > > there is something I do not understand. > I reduced the code to a minimal case. > > If I do: >my $a = 23; >my $b = $a; # copy >$a = 42; >say $b; # 23 > $b is 23, > and if I do: >my $a =

Strange variable behaviour

2008-06-22 Thread Frederik Schwarzer
Hi, there is something I do not understand. I reduced the code to a minimal case. If I do: my $a = 23; my $b = $a; # copy $a = 42; say $b; # 23 $b is 23, and if I do: my $a = 23; my $b := $a; # reference $a = 42; say $b; # 42 $b is 42 because it is just a r