you can tie to a hash, and get to iterate through the keys(variables) and values(actual values) of the hash.
an example is given in the man page of the config::inifiles itself. it is easy
use Config::IniFiles;
my %ini
tie %ini, 'Config::IniFiles', ( -file => "/path/configfile.ini" );
print "We have $ini{Section}{Parameter}." if $ini{Section}{Parameter
+};
my @keys = keys %{$ini{$section}}
while (($k, $v) = each %{$ini{$section}}) {...}
if( exists %{$ini{$section}}, $parameter ) {...}
Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
|