Re: dereferencing
- From: paul@xxxxxxxx (Paul Johnson)
- Date: Tue, 30 Oct 2007 01:33:39 +0100
On Mon, Oct 29, 2007 at 05:21:52PM -0700, Tom Phoenix wrote:
On 10/29/07, Jeremy Kister <perl-04@xxxxxxxxxxxxxxxx> wrote:
On 10/29/2007 7:23 PM, Aaron Priven wrote:
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.
my %newhash = %{$hashref};
You have made a copy of the hash. I do not believe that that is what
the original poster wished, which I think would be a new hash that the
old reference points to. I don't think that what the original poster
wants is even possible, but I can't see any reason to need it, either.
Perhaps something like Data::Alias, for example, might do the trick.
--
Paul Johnson - paul@xxxxxxxx
http://www.pjcj.net
.
- Follow-Ups:
- Re: dereferencing
- From: Aaron Priven
- Re: dereferencing
- References:
- dereferencing
- From: Aaron Priven
- Re: dereferencing
- From: Jeremy Kister
- Re: dereferencing
- From: Tom Phoenix
- 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
|