On Wed, Sep 19, 2001 at 12:07:16PM -0500, [EMAIL PROTECTED] wrote:
> Thanks for the answer but what I want to know is the meaning of %$$self. I
> understand autovivification ( data structures spring into existence ).
> However, the part I don't understand is %$$self. Shouldn't it be %$self?
I haven't been following this conversation very closely, but if you're
asking if %$$self and %$self are the same, they aren't. Given %$$val1 and
%$val2, $val1 is a reference to a scalar, which contains a reference to a
hash; $val2 is a reference to a hash. Attempting to dereference $val2 as
%$$val2 would get you fatal error; try it.
$val1 = \{};
$val2 = {};
print %$$val2;
> (By the definition, you can always put a reference in place of the
> literal in the variable. i.e. $self{k} and $$reftoself{k}. Replacing
> "self" with "$reftoself" is equivalent.
I suppose, in concept, that's correct. However, it's incorrect to refer to
$self as a literal, or to $self without its qualifying sigil. The symbol
'self' is very different from the scalar $self.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]