in reply to Using config::any
You guys are making this all far more difficult than it needs to be.
use strict; use warnings; use Config::Any; #By the way, load_files is only useful for multiple files, in which ca +se 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 i +t like one. print $cfg->{password}->{password};
The docs for Config::any can be a bit confusing for the beginning programmer, I know.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using config::any
by ItsyBitsy (Novice) on May 31, 2012 at 02:54 UTC | |
by kcott (Archbishop) on May 31, 2012 at 10:58 UTC | |
by ItsyBitsy (Novice) on Jun 01, 2012 at 08:06 UTC |