use strict; use warnings; use Config::Any; my @files = ("test.cfg.ini");# $files[0]="C:\\wamp\\www\\password.ini"; my $cfg = Config::Any->load_files({files =>\@files,use_ext => 1 }); for my $c (@$cfg){ for my $f (keys %$c){ print "File $f has the following :\n"; for my $section(keys %{$c->{$f}}){ print " in Section $section:\n"; for my $k2 (keys %{$c->{$f}{$section}}){ print "\t$k2=" . $c->{$f}{$section}{$k2} . "\n"; } } } } }