in reply to dynamic hash nesting
If you have control over the file format you may like to consider using something like YAML or JSON instead of a hand rolled configuration file format.