A couple of extra notes.
Back in the Bad Old Days, if memory location B held, as a value, another memory location C (which held some value, perhaps 42), we would say the 'pointer' B held an 'address'.
It's not language dependent. A pointer or reference contains an address by definition.
We also spoke of 'indirect addressing'. But I think this is not quite correct and perhaps misleading in Perl.
The concept simply doesn't apply since one never works with addresses directly in Perl. Even if you tried to stretch the metaphor beyond its breaking point, I don't see how one could say Perl ever uses indirect addressing. Dereferencing is done explicitly by the user.
my $ref = \$var; print($var); # print access $var directly print($$ref); # print access $var directly, doesn't even see $ref
I like referent
$2 references $3. In that relationship, $2 is a referer, and $3 is a referent. 3 and 42 are not involved. Nothing references 3, so it's not the referent in any reference.
Update: Added last quote and its reply.
In reply to Re: What's in a Reference?
by ikegami
in thread What's in a Reference?
by Xiong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |