Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Insert a new key (that is a hash) to a hash

by Transient (Hermit)
on Jun 17, 2009 at 17:58 UTC ( [id://772496]=note: print w/replies, xml ) Need Help??


in reply to Insert a new key (that is a hash) to a hash

You're mixing up hash references with hashes in your syntax. The 9/16 is you hash in a scalar context, not the hash itself.

You want something more like:
my %hashList = (); ... $hashList{$count} = \%secondHash; ... my $hashtemp = $hashList{$count}; while ( my ($key, $value) = each ( %$hashtemp ) ) { ... }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-25 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found