develooper Front page | perl.perl6.users | Postings from September 2017

Re: Any way to get hashes to loop in order?

Thread Previous | Thread Next
From:
Brock Wilcox
Date:
September 30, 2017 21:00
Subject:
Re: Any way to get hashes to loop in order?
Message ID:
CAFkkL_jVgmc3xkxH6NHFq15s_QYDnb0_y_pLYtNi7Y4fwtMUNg@mail.gmail.com
Maybe a list/array of pairs would be better, and then cast it to a hash if
you need to do fast lookups.

On Sep 30, 2017 12:41 PM, "Parrot Raiser" <1parrota@gmail.com> wrote:

> Prepending the real key value with an order indicator, then sorting
> the retrieved list on the key would achieve that, (though the maximum
> number size would have to be known in advance.
>
> E.g. 001First_key => data1, 002Second => data2
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About