Welcome to the Monastery | |
PerlMonks |
Re: Simplifying for loop and applying multiple push functionby NetWallah (Canon) |
on Dec 15, 2005 at 04:59 UTC ( [id://516859]=note: print w/replies, xml ) | Need Help?? |
I would question choice of the data structure used. Given just the context in the OP's question, I would structure %hash as an array, and the problem practically solves itself. This, ofcourse, assumes the indices (or keys) are sequential, numeric. If this is NOT the case, it is still more convenient to look at the %hash as an array of tuples, and code it as an AOA, since there seems to be an implied requirement to retrieve elements in a particular order. You're just jealous cause the voices are only talking to me. No trees were killed in the sending of this message. However, a large number of electrons were terribly inconvenienced.
In Section
Seekers of Perl Wisdom
|
|