Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks!
I have a hash, which I have sorted based on its values, so, apparently, the %keys array of the sorted hash are the values of the initial array.
What I would like to do is to reduce this %keys array recursively, by, let's say 10 elements each time, so, the first time I would get the first 10 elements, the second time, the next 10 etc...
Is there any easy way to do this?
Thanks
I have a hash, which I have sorted based on its values, so, apparently, the %keys array of the sorted hash are the values of the initial array.
What I would like to do is to reduce this %keys array recursively, by, let's say 10 elements each time, so, the first time I would get the first 10 elements, the second time, the next 10 etc...
Is there any easy way to do this?
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: recursively reduce an array
by Limbic~Region (Chancellor) on Nov 05, 2012 at 22:09 UTC | |
Re: recursively reduce an array
by rjt (Curate) on Nov 05, 2012 at 22:56 UTC | |
Re: recursively reduce an array
by johngg (Canon) on Nov 06, 2012 at 11:58 UTC |
Back to
Seekers of Perl Wisdom