Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Hashes... Light switch isn't coming on

by LanX (Chancellor)
on Dec 12, 2012 at 16:54 UTC ( #1008530=note: print w/replies, xml ) Need Help??


in reply to Hashes... Light switch isn't coming on

replace

%HoH = {$primary}{$secondary} => $tertiary);

with

 $HoH{$primary}{$secondary} = $tertiary;

EDIT:

But what I actually get is

$VAR1 = { 'bar' => 'p2', 'itemb' => undef };

sure, you're redefining the complete Hash in the deepest loop, and these are the three values of the last iteration. (plus undef because hashes are always even)

Cheers Rolf

) which has a syntax error at ), please only post code you really tried.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008530]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-07-25 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (374 votes). Check out past polls.