in reply to Read a file into a hash

There are also various modules to simplify the parsing of a config file. Config::Fast appears to be pretty straightforward.