Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by LanX (Canon)
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.


Comment on Re: Hashes... Light switch isn't coming on
Select or Download Code

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 exploiting the Monastery: (15)
As of 2014-07-11 14:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (227 votes), past polls