in reply to recursively reduce an array
Anonymous Monk,
Hashes aren't sorted - even with Tie::Hash::Sorted which appears to be sorted, there are things going on under the covers to make it look like it is sorted.
Hashes aren't sorted - even with Tie::Hash::Sorted which appears to be sorted, there are things going on under the covers to make it look like it is sorted.
It sounds like what you have is this:
If that isn't what you mean, you will need to try and provide more context or hope one of the other monks has guessed better than myself.my @sorted_keys = sort keys %hash; while (@sorted_keys) { my @ten = splice(@sorted_keys, 0, 10); # Do something with @ten }
Cheers - L~R
In Section
Seekers of Perl Wisdom