On 7/2/05, Michael Peters <[EMAIL PROTECTED]> wrote: > demerphq wrote: > > >>x=y; but x,x != y,y? > > > > > > but rather > > > > x=y, but x,x != y,z > > But if we say > x=y and x=z can we then say that x,x != y,z > > If say > $x = []; > $y = []; > $z = []; > is_deeply($x, $y); # passes > is_deeply($x, $z): # passes > is_deeply([$x,$x], [$y, $z]); # fails for some reason > > If we broke this out into a formal logical proof, the only way > that x,x != y,z would would is if x != y or x != z, or both.
Well i wouldn't say that algerbra is the right form for this problem. We arent looking numerical equivelence, we are more looking at topological equivelence. But if $x==$y and $y==$z (as in the hold the same reference) then [$x,$x] == [$y,$z] However, the same wouldnt be true if we were aliasing the scalars into the array and not copying their values. my [EMAIL PROTECTED]>($x,$x); my [EMAIL PROTECTED]>($y,$z); As again they would be topologically different. -- perl -Mre=debug -e "/just|another|perl|hacker/"