Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2016-09-25 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (466 votes). Check out past polls.