in reply to Read from a header file like C

I looked around on my ActivePerl 5.20 machine to see what modules would already be there without me having to install anything. Turns out the super light-weight Config::Tiny ships with the distribution. In the doc, more sophisticated versions are mentioned. The code is similar to the YAML example, except the format is in Windows .ini format.
#!user/bin/perl use strict; use warnings; use Data::Dumper; use Config::Tiny; my $file=<<END; [DBname] Port Number = 1000 host name = abc01.xyz.com username = gvenkat password = ganesh99 END my $Config = Config::Tiny->new; $Config = Config::Tiny->read( \$file ); my $portnum = $Config->{DBname}->{'Port Number'}; print "$portnum\n"; my $hostname = $Config->{DBname}->{'host name'}; print "$hostname\n"; my $username = $Config->{DBname}->{'username'}; print "$username\n"; my $password = $Config->{DBname}->{'password'}; print "$password\n"; my $href = $Config->{DBname}; print Dumper $href; __END__ 1000 abc01.xyz.com gvenkat ganesh99 $VAR1 = { 'username' => 'gvenkat', 'Port Number' => '1000', 'host name' => 'abc01.xyz.com', 'password' => 'ganesh99' };
I'd store any other config stuff in the DB. Looks like the purpose is just to "get going" without having to modify the code itself.

Update: I looked at the post from Your Mother at Re: Read from a header file like C. That seems to be the way to go for MySQL. Similar format to the above.