in reply to about order in hash keys
Chris
PERL_HASH_SEED (Since Perl 5.8.1.) Used to randomise Perl's internal hash function. To emulate the pre-5.8.1 behaviour, set to an integer (zero means exactly the same order as 5.8.0). ``Pre-5.8.1'' means, among other things, that hash keys will be ordered the same between different runs of Perl.The default behaviour is to randomise unless the PERL_HASH_SEED is set. If Perl has been compiled with -DUSE_HASH_SEED_EXPLICIT, the default behaviour is not to randomise unless the PERL_HASH_SEED is set.
If PERL_HASH_SEED is unset or set to a non-numeric string, Perl uses the pseudorandom seed supplied by the operating system and libraries. This means that each different run of Perl will have a different ordering of the results of keys(), values(), and each().
Please note that the hash seed is sensitive information. Hashes are randomized to protect against local and remote attacks against Perl code. By manually setting a seed this protection may be partially or completely lost.
See Algorithmic Complexity Attacks in the perlsec manpage and PERL_HASH_SEED_DEBUG for more information.
|
|---|