how to make config and locale files

My idea is to make the config and language files in the following format:

option = "some value"
second = "something else"

I need to make a package, which perform this:

my %config = ();
$config = ( option => "some value",
                 second => "something else"
);

How to parse the file in order to load its contents in hash?
LVL 12
Ivanov_GAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
TintinConnect With a Mentor Commented:
I'd recommend some of the CPAN modules for config files.

See http://search.cpan.org/~wadg/Config-IniFiles-2.38/IniFiles.pm
0
 
Ivanov_GAuthor Commented:
Yep, that will do the work. Thanks.
0
All Courses

From novice to tech pro — start learning today.