Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: recursively reduce an array

by Limbic~Region (Chancellor)
on Nov 05, 2012 at 22:09 UTC ( #1002392=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002392]
help
Chatterbox?
marioroy At a large firm, had to awaken a security guy a few times so that nobody would catch him sleeping.
marioroy On a large dairy farm, almost went off the road with a 10 wheeler from exhaustion. On the farm, almost went off the silo with a big tractor. At the Fransiscan monastery, almost slipped off the dome while painting it.
[marioroy]: In Saudi Arabia caught fire but didn't burn. I think angels exist.
Lady_Aleena clean up after dinner finally.
[Discipulus]: uch! so we are twice lucky to have MCE..;=)
[marioroy]: Working a midnight graveyard shift, on the way home ran out of gas. just 2 minutes later somebody stops with a small tank of gas. It's wierd. There's always someone nearby for some reason.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-05-29 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?