There's more than one way to do things | |
PerlMonks |
Re: Which is the better option?by mrbbking (Hermit) |
on May 18, 2002 at 13:13 UTC ( [id://167501]=note: print w/replies, xml ) | Need Help?? |
If you decide to go with a single flat file along the lines of the example you used, you might consider Config::IniFiles or Config::Simple. Both insulate you from the drudgery of parsing that sort of file by hand.
Your file format would have to change a little, but it would be quite similar: Then, something like this: might get you what you need. But Config::IniFiles only reads the values - it does not offer a way to write/update them. I see that Config::Simple does have writing methods, so - if you go with this file format, you may want to take some time to look into that one. I hope that helps you...
In Section
Seekers of Perl Wisdom
|
|