Config::IniHash might do what you want, concretely.
If you are not committed to .ini style, consider YAML.
After Compline,Zaxo
In reply to Re: .ini file by Zaxo in thread .ini file by Real Perl