jim_neophyte has asked for the wisdom of the Perl Monks concerning the following question:
i thought the ordering of keys/values are or will be random, i.e. the values function gathers the values and returns them in random order; then the keys function gathers the keys and returns them in random order.
my understanding is that the order of keys and values being returned is affected by insertion order. i also thought that soon if not already the order returned is further randomized for some sort of security thing.
if i understand the following code, the keys function and values function will have to operate on the hash at the same time. will the following really work?
thanks.my %extra = @_; @${self{keys %extra} = values %extra;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using values and keys functions
by tlm (Prior) on Jun 08, 2005 at 20:12 UTC | |
|
Re: using values and keys functions
by Roy Johnson (Monsignor) on Jun 08, 2005 at 20:15 UTC | |
|
Re: using values and keys functions
by tilly (Archbishop) on Jun 09, 2005 at 01:08 UTC | |
by monarch (Priest) on Jun 09, 2005 at 07:25 UTC | |
by BrowserUk (Patriarch) on Jun 09, 2005 at 14:09 UTC | |
by tilly (Archbishop) on Jun 09, 2005 at 19:01 UTC | |
|
Re: using values and keys functions
by shemp (Deacon) on Jun 08, 2005 at 22:50 UTC |