http://www.perlmonks.org?node_id=862484


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.