use Config::General; my $cfg_file = '/path/to/some/file'; my $cfg_obj = Config::General->new($cfg_file); my $href_config = $cfg_obj->get_all();