You're tying %xhash, a hash unrelated to XML::Simple or what it returns. You would need to tie the multiple hashes XML::Simple creates, and you would have to do so before it populates them. This would involve changing XML::Simple*, and it would create a significant performance hit.
Of course, the better answer is to not use a hash in the first place. See ForceArray, or use a better parser.
* — almut showed a way of doing this non-obtrusively.
In reply to Re: help to preserve the order of hash
by ikegami
in thread help to preserve the order of hash
by satzbu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |