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 (Bishop) on Jun 21, 2007 at 19:28 UTC
    for my $nestedKey (sort keys %{$hash{$key}})

    Surely?

    update: bah! Stealth edit:(