http://www.perlmonks.org?node_id=1002392


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.

It sounds like what you have is this:

my @sorted_keys = sort keys %hash; while (@sorted_keys) { my @ten = splice(@sorted_keys, 0, 10); # Do something with @ten }
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.

Cheers - L~R