Quoth [EMAIL PROTECTED] ("Mark J. Reed"): > On 8/17/06, David Green <[EMAIL PROTECTED]> wrote: > > > $a=[1, 2, [EMAIL PROTECTED]; > > > $c=[1, 2, [EMAIL PROTECTED]; > > > $d=[1, 2, [EMAIL PROTECTED]; > > > > > >So $a, $c, and $d may all have the same *value* > > >(or "snapshot", when evaluated all the way down > > >through nesting and references), i.e. they might > > >be eqv, but only $a and $c are === because they > > >have the same contents [unevaluated contents] > > >and $d doesn't. > > In this case, it seems like [===] @$a, @$c would do what you want, > yes? It would return true, while [===] @$a,@$d would return false... > > In the general case - well, I think the thread demonstrates that it's > hard to define a general case for what you want to do. Based on your > example, I assumed you wanted one-level dereferencing, regardless of > the contents. But it sounds like what you want is infinite > dereferencing as long as the referent is anonymous, and no > dereferencing if the referent is a named variable?
Surely that's a meaningless distinction? A named variable can become anonymous if its name goes out of scope; an anon can be bound to a name. Just to make sure I've got all this straight: =:= compares names === compares containers eqv compares values So given an array @W, my @X := @W; # @X =:= @W my @Y = @W; # @Y === @W but @Y !=:= @W my @Z = @W.clone; # @Z eqv @W but @Z !=== @W ? This seems like a useful set of distinctions to me... <lurk> Ben -- The cosmos, at best, is like a rubbish heap scattered at random. Heraclitus [EMAIL PROTECTED]