in reply to Perl hashes and non-determinism

Instead of using a raw hash, you can use Hash::Ordered.