in reply to Consistent order of (keys %hash)?

Of course, your question leads me to think that you're not using the correct data structure. It might behoove you to use a tied hash that stores its keys in some internal data structure. Then, you can redefine the KEYS, VALUES, and EACH functions (or whatever they're called) to access that array vs. accessing the hash itself. This would allow you to guarantee, beyond a scintilla (SAT!!) of a doubt, that the order of keys would always be the same. In fact, it would allow you to guarantee the following, too!
# Put the first ten things in my @first_ten = (keys %hash)[0 .. 9]; # add some values to %hash my @first_ten2 = (keys %hash)[0 .. 9]; $first_ten[3] eq $first_ten2[3]
Which could be useful, I admit.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.