"Awarsd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> for(1..99){
>   $result{$_}=$_;
> }
> ##saved it in a dbm file and reopen to the file
> ##when i open the file i just read all the keys and display
> ## the key
> .....
> foreach (keys %dbm){
> print "$_,";
> }
> ## now the interesting part (everything works ok no error)
>
> when it display
> instead of printing
> 1,2,3,4,5,6,7,8,9,10 etc,,
> what it is this
> 1,10,11,12,13,14,15,16,17,18,19,2,20,21,22 etc.....
> and I don't know why!!
> cause i save in the file in this order
> 1,2,3,4,5,6,7,....
>

This is a defined behavior of hashes. Re-read your reference material on
hashes. Note that key, value pairs are stored in a ( seemingly ) random
order.

Todd W.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to