Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sorting hash of hashes

by Zaxo (Archbishop)
on Jun 21, 2007 at 19:25 UTC ( [id://622663]=note: print w/replies, xml ) Need Help??


in reply to Sorting hash of hashes

Replace the while each loop with,

for (sort keys %{$hash{$key}}) { print "nested key: $_ \n"; }
Hashes don't stay sorted.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Sorting hash of hashes
by FunkyMonk (Chancellor) on Jun 21, 2007 at 19:28 UTC
    for my $nestedKey (sort keys %{$hash{$key}})

    Surely?

    update: bah! Stealth edit:(

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found