Re: References to anon array

2004-10-05 Thread John W. Krahn
Adam wrote: I am expecting in both examples the same result: Example1: the same references Example2: the same references However, I get: Example1: different references Example2: the same references What am I missing? #Example1 my $r1 = [1, 3]; Store a reference to an anonymous array in a scalar. my

References to anon array

2004-10-05 Thread Adam
I am expecting in both examples the same result: Example1: the same references Example2: the same references However, I get: Example1: different references Example2: the same references What am I missing? thanks adam Here is the code: #Example1 my $r1 = [1, 3]; my $r2 = [1, 3]; if ($r1 eq $r2)