You want a hash, but one that maintains the order? Just like in PHP? Then perhaps look into one of those many hash modules on CPAN. The
FAQ only mentions
Tie::IxHash, and seen its age, I gather it must be one of the more robust modules for this purpose.