Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Referencing a HoH

by P0w3rK!d (Pilgrim)
on May 07, 2003 at 17:55 UTC ( [id://256327]=note: print w/replies, xml ) Need Help??


in reply to Re: Referencing a HoH
in thread Referencing a HoH

What do I do here? Is something like this possible?
foreach $key (keys %hshFoo) { %hsh2 = bless($hshFoo{$key}); foreach $key2 (keys %hsh2) { # ...do something w/ %hsh2 here } }
It appears that %hsh2 becomes unusable if I try to put it in place of %hshFoo in the loop above. When I evaluate %hsh2 in the debugger I see FOO:HASH(0x1ddba60) versus $hshFoo=HASH(0x1ddba60). Is this a proper use of bless() in this instance?

-P0w3rK!d

Replies are listed 'Best First'.
Re: Re: Re: Referencing a HoH
by Mr. Muskrat (Canon) on May 07, 2003 at 17:57 UTC
    No need to bless it... my %hsh2 = %{$hshFoo{$key}};

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://256327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-24 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found