Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^6: Possible for Map to create Hash of Hash?

by LanX (Canon)
on May 24, 2013 at 22:11 UTC ( #1035215=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Possible for Map to create Hash of Hash?
in thread Possible for Map to create Hash of Hash?

> If the OP doesn't need it, then no need to do it that way. We have no way of knowing if that's what the OP needs, maybe they don't know about the other solution.

Well the OP explicitly asked for HoHs and said " To create a hash that will allow me to determine if a store has a product I can use: "

I'm no native speaker, but for me this also reads like "if a store has products at all" which is quite complicated with a flat multi-dim hash.

I'm not banning multi-dim hashes both approaches have pro and cons.

Cheers Rolf

( addicted to the Perl Programming Language)


Comment on Re^6: Possible for Map to create Hash of Hash?
Re^7: Possible for Map to create Hash of Hash?
by runrig (Abbot) on May 25, 2013 at 14:29 UTC
    Well the OP explicitly asked for HoHs and said " To create a hash that will allow me to determine if a store has a product I can use: "

    I'm no native speaker, but for me this also reads like "if a store has products at all" which is quite complicated with a flat multi-dim hash.

    To me it sounds like he just needs a store/product lookup and assumes that he needs an explicit HoH...but it is somewhat ambiguous, and things around here are not always clearly written, so let's just throw both solutions out there and let'em pick.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-08-21 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls