Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Hashes Question

by karlgoethebier (Vicar)
on Nov 30, 2012 at 17:33 UTC ( #1006503=note: print w/ replies, xml ) Need Help??


in reply to Hashes Question

I found something interesting about this at stackoverflow.

For details please take a look at the provided link.

Karls-Mac-mini:Desktop karl$ ./hash_walk.pl $VAR1 = { 'c' => { 'ca' => 8, 'cb' => { 'cba' => 9, 'cbb' => 10 } }, 'a' => { 'ab' => 1, 'ad' => { 'adb' => 4, 'ada' => 3, 'adc' => { 'adcb' => 6, 'adca' => 5 } }, 'ac' => 2 }, 'b' => 7 }; k = ca v = 8 key_list = [c ca] k = cba v = 9 key_list = [c cb cba] k = cbb v = 10 key_list = [c cb cbb] k = ab v = 1 key_list = [a ab] k = adb v = 4 key_list = [a ad adb] k = ada v = 3 key_list = [a ad ada] k = adcb v = 6 key_list = [a ad adc adcb] k = adca v = 5 key_list = [a ad adc adca] k = ac v = 2 key_list = [a ac] k = b v = 7 key_list = [b]

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»


Comment on Re: Hashes Question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2015-07-02 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (31 votes), past polls