Re: dereferencing
- From: rootbeer@xxxxxxxxxx (Tom Phoenix)
- Date: Mon, 29 Oct 2007 17:26:46 -0700
On 10/29/07, Aaron Priven <aaron@xxxxxxxxxx> wrote:
I can do this:
my $hashref = \%hash;
But as near as I can tell, there is no way to do the reverse
operation: making a "my %hash" that is an alias for a hash reference.
You mean, given a reference to a hash, create a named lexical hash
that that reference refers to? No, that's not possible. Why would you
even want to do that? Is it just a matter of convenience, so you can
avoid dereferencing?
As you found, you can manipulate the symbol table so that a name
refers to a hash from a reference, but lexical variables aren't in the
symbol table.
Cheers!
--Tom Phoenix
Stonehenge Perl Training
.
- References:
- dereferencing
- From: Aaron Priven
- dereferencing
- Prev by Date: Re: dereferencing
- Next by Date: Re: dereferencing
- Previous by thread: Re: dereferencing
- Next by thread: Re: dereferencing
- Index(es):
Relevant Pages
|