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

2017-09-30 Thread Brandon Allbery
On Sat, Sep 30, 2017 at 5:00 PM, ToddAndMargo wrote: > On 09/29/2017 07:25 PM, Brandon Allbery wrote: > >> The point of a hash is that it computes hash values from its keys for >> fast lookup, >> > > Not me. I use them to "organize" data all in one easy to look > up

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

2017-09-30 Thread ToddAndMargo
On Sep 30, 2017 12:41 PM, "Parrot Raiser" <1parr...@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.

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

2017-09-30 Thread ToddAndMargo
On 09/29/2017 07:25 PM, Brandon Allbery wrote: The point of a hash is that it computes hash values from its keys for fast lookup, Not me. I use them to "organize" data all in one easy to look up place. For example: my %SmtpIni = [ 'DebugTrace' => "", 'smtp' => "", 'port'

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

2017-09-30 Thread Brock Wilcox
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" <1parr...@gmail.com> wrote: > Prepending the real key value with an order indicator, then sorting > the retrieved list on the key would achieve that,

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

2017-09-29 Thread ToddAndMargo
On 09/29/2017 07:25 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 9:55 PM, ToddAndMargo > wrote: for %SmtpIni.kv -> $key, $value { say $key; } Does "say" the keys in the order that I created them. Is there a way to get

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

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 9:55 PM, ToddAndMargo wrote: > for %SmtpIni.kv -> $key, $value { say $key; } > > Does "say" the keys in the order that I created them. > > Is there a way to get them to do so? > Not without storing that order somewhere yourself and using it to

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

2017-09-29 Thread ToddAndMargo
On 09/29/2017 06:55 PM, ToddAndMargo wrote: Hi List, for %SmtpIni.kv -> $key, $value { say $key; } Does "say" the keys in the order that I created them. Does not Stinking typos Is there a way to get them to do so? Many thanks, -T -- ~~ Computers

Any way to get hashes to loop in order?

2017-09-29 Thread ToddAndMargo
Hi List, for %SmtpIni.kv -> $key, $value { say $key; } Does "say" the keys in the order that I created them. Is there a way to get them to do so? Many thanks, -T