[performance]
pop1 = 192.168.1.1
pop2 = 192.168.1.2
[pop1]
2 = 123
2 = 345
4 = 125
[pop2]
6 = 503
10 = 444
####
sub mklist() {
my $config = "/home/portal/test/performance.conf";
my %ini;
tie %ini, 'Config::IniFiles', ( -file => $config);
push @hostnames, keys%{$ini{'performance'}};
push @ips, values%{$ini{'performance'}};
#print "Hosts: @hostnames\n\n";
#print "IPs: @ips\n\n";
for (my $i = 0; $i < @hostnames; $i++) {
push @slots, keys%{$ini{'$hostnames[$i]'}}; ## Here something is wrong...
push @ifindices, values%{$ini{'$hostnames[$i]'}};
}
print "Slots: @slots\n\n"; ## this prints nothing
print "Indices: @ifindices\n\n" ## this prints nothing as well...
}
####
push @slots, keys%{$ini{'pop1'}};