Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 lurking in the Monastery: (12)
As of 2016-07-01 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (412 votes). Check out past polls.