Phil Schaechter wrote:
> 
> > You will note that the documentation says "apparently random order."  In
> > more recent versions of Perl (IIRC starting at 5.8.1) randomness was
> > added to hash keys for security reasons.  In previous versions the order
> > of the hash keys was determined by the hash function used which appeared
> > random because it was not the same order that the keys were entered.
> > As to your question, if the hash keys remain the same then the order
> > will remain the same.  However, if you add or delete keys then the order
> > may change.
> 
> Thanks for the information John.  Will the order only change if I add or
> delete keys?

AFAIK yes.

> Or if I am modifying large numbers of keys?

You cannot modify hash keys, at least not Perl's built-in hashes.  If
you use a tied hash then anything is possible.  :-)



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to