in reply to Re: Config files
in thread Config files

Basically I want to create a config file where the variables can be changed by people who don't know perl.

So I was wondering...what is the best way to create the config file in terms of substituting variables that will be used over and over again in the config file.

I just gave the example of the $root . '\code' , but is there a better way to subsititute the root variable in the config file?

Thanks.

Replies are listed 'Best First'.
Re^3: Config files
by ikegami (Patriarch) on Dec 07, 2004 at 02:18 UTC

    If you're so concerned about the complexity the config file, why don't you write an interactive configuration utility?

    Back to the matter immedately at hand...

    You keep talking about the config file, while you should be talking about the module that reads the config file and the program that uses the module. If you used the code I posted earlier in this thread, you could write your config file as:

    [path] root = C:\test code = %root%\code1 include = %root%\include lib = %root%\lib

    instead of

    [path] root = C:\test code = C:\test\code1 include = C:\test\include lib = C:\test\lib

    It doesn't get any simpler (from the config file's perspective). What else do you want?