Advertisement

02.06.2008 at 08:25PM PST, ID: 23143523
[x]
Attachment Details

How to write a perl script which reads the configuration file in the mentioned format

Asked by gravindra1977 in Perl Programming Language, Shell Scripting

Tags: perl

Hi,
I need a perl script which reads the configuration file in the following format

config.ini

[DEV]
<Key1>=<Value1>
<Key2>=<Value2>
....

[QA]
<Key1>=<Value1>
<Key2>=<Value2>
.....

[PRD>
<Key1>=<Value1>
<Key2=<Value2>
....

DEV,QA or PRD and config file path and name would be passed as an arguments to this perl script. The script should read that particular section of the Key, Value pairs and store them, so that I can use these in rest of my perl script.
Please provide me with the perl code... preferably without using any of the existing modules. This perl script will be run on SunOs unix operating system.

Thanks for the help and I appreciate the sameStart Free Trial
[+][-]02.06.2008 at 09:10PM PST, ID: 20838398

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.06.2008 at 09:13PM PST, ID: 20838413

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.07.2008 at 09:00PM PST, ID: 20847949

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.07.2008 at 09:24PM PST, ID: 20848029

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.07.2008 at 09:35PM PST, ID: 20848067

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.07.2008 at 09:56PM PST, ID: 20848137

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.08.2008 at 07:20AM PST, ID: 20850977

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Shell Scripting
Tags: perl
Sign Up Now!
Solution Provided By: Adam314
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628