If you're willing to switch from YAML to JSON, you could take a look at my JSON::MultiValueOrdered module which preserves the order of hash keys (and also preserves repeated keys).
In reply to Re: Keeping Order with YAML::XS
by tobyink
in thread Keeping Order with YAML::XS
by walkingthecow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |