Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Iterating through a HoHoH ... does a particular sub-hash exist?

by CountZero (Bishop)
on Apr 05, 2010 at 19:05 UTC ( #832883=note: print w/ replies, xml ) Need Help??


in reply to Iterating through a HoHoH ... does a particular sub-hash exist?

Are you using the strictures, jedikaiti?

If you did, you would have seen that

$cmdData->{$cmd}{subfields}
gives you an error, unless you have elsewhere declared $cmdData.

$cmdData->... contains a scalar reference and has nothing to do with your hash %cmdData. You probably meant something like $cmdData{'command_2'}->{subfields}.

Update: Forget what I wrote above. I somehow totally missed the code in your node. Thanks almut for pointing that out to me.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James


Comment on Re: Iterating through a HoHoH ... does a particular sub-hash exist?
Select or Download Code
Re^2: Iterating through a HoHoH ... does a particular sub-hash exist?
by almut (Canon) on Apr 05, 2010 at 19:40 UTC

    I guess the retrieve in my $cmdData = retrieve('file.pm') would return a reference to the hash in question, so things should be fine.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-08-27 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (237 votes), past polls