how to make config and locale files

Posted on 2004-11-22
Last Modified: 2013-12-25
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?
Question by:Ivanov_G
    LVL 48

    Accepted Solution

    I'd recommend some of the CPAN modules for config files.

    LVL 12

    Author Comment

    Yep, that will do the work. Thanks.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
    This article will show, step by step, how to integrate R code into a R Sweave document
    Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now