use strict; use warnings; use Config::Any; #By the way, load_files is only useful for multiple files, in which case you will have to change the code below. For only one file, load() is good enough. my $cfg = Config::Any->load( "C:\\wamp\\www\\password.ini" ); #Simply printing $cfg will print its reference, like you asked for. #Config::Any returns a hashref(when used with [cpan://Config::Any::INI] which interfaces to [cpan://Config::Tiny]), so you need to access it like one. print $cfg->{password}->{password};