Thomas Sandlaß skribis 2005-04-01 23:37 (+0200): > Juerd wrote (with substitution applied): > >IMO, =:= should not auto(de)reference. > So you expect $bar to contain value 2 and detach from $foo?
No. But if you said $baz instead of $bar, then yes. > How would one then reach the value in $foo? With $$baz? Assuming you did mean $baz in the previous line, yes. > And for longer chains of referene with a corresponding number > of $ on the front? But IIRC that was obviated in Perl6. Exactly. Because an array in scalar context is automatically referenced, and an arrayref in array context is automatically dereferenced, that implicity can exist. But a reference IS a scalar, and having scalars reference or dereference in scalar context automatically is madness. And if we're saying that an array is a scalar as much as a string or a number is, then why are values mutable, do scalars not have three different sigils and do things automatically convert without the intervention of lists? If =:= tests variable sameness, then it should do that literally in order to both be useful and look like :=. For reference equality you can still use \FOO == \BAR (I assume). Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html