Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Hashes Question

by karlgoethebier (Prior)
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»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006503]
help
Chatterbox?
[Discipulus]: to eat, no? grin
[Eily]: hu, don't tell the other French people I never tried it, I might get kicked out :P
choroba . o O ( The Czech at-sign is also edible )
[Eily]: the French @ is a mouthful I guess...
[Eily]: choroba Wikipedia gives me Zavinįč which doesn't seem to translate to something edible?
[Eily]: (yes I'm very good at using question marks, thank you)
[Discipulus]: O_O frexit for you! even me i tried. it was in the arabic quarter in Granada; they offered as 'tapas' in bars. I eataly somewhere they eat ;=P Sardinia a Pulia iirc
[choroba]: Zavinįč

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-11-21 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (297 votes). Check out past polls.

    Notices?