I have to grab a configuration directive from multiple configuration files for a series of identical web applications, each in their own folders.
I have the code to step through and open each file, in it’s own folder. what I am lacking is a statement that will return the value specified in the config:
$variable="value"
I want to search for $variable, and return with "value" , perform my operation with that value, and close the file.
I know it’s got to be something simple I am forgetting. Anyone have some hints?
You could use several of the existing config modules from CPAN (Searching for Config for example)
There are modules for almost all flavours and needs of config files: (Examples)
Don’t reinvent the wheel by coding another configuration module.