Assigning arrays to hashes is usually a bad idea. The excellent suggestions above (especially the one by GrandFather) will help you get this to work; but you really should look into using one of the relevant CPAN modules, such as Config::INI::Simple.