Hashes don't keep your data in any knowable order- they keep it however works best for them. That's why you have to reference a value by it's key, not by it's location in the hash.
-----Original Message----- From: awarsd [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:52 AM To: [EMAIL PROTECTED] Subject: hash question Hi, maybe someone can enlighten me(if it is possible). I did a very simple loop/save/open/display to test hash. ....... ....... 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,.... any enlightment is appreciated Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]