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) { print "Example1: the same references\n"; } else{ print "Example1: different references\n"; } #Example2 my @a1 = (1, 3); my $r3 = [EMAIL PROTECTED]; my $r4 = [EMAIL PROTECTED]; if ($r3 eq $r4) { print "Example2: the same references\n"; } else{ print "Example1: different references\n"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>