F
Fred
If I run the code snippet below using the AppConfig
module, I receive the error:
user: no such variable
Use of uninitialized value in print at ./appconfig.pl line 22.
I've included the app.cfg configuration file that I'm reading
with AppConfig. I read the docs, but don't see what I'm
doing wrong. Any ideas?
-Thanks
appconfig.pl
#!/usr/bin/perl -w
use strict;
use AppConfig qwexpand);
my $cfgfile = '/home/fred/app.cfg';
my $config = AppConfig->new($cfgfile);
print $config->user();
/home/fred/app.cfg:
user = fred
home = /home/fred
module, I receive the error:
user: no such variable
Use of uninitialized value in print at ./appconfig.pl line 22.
I've included the app.cfg configuration file that I'm reading
with AppConfig. I read the docs, but don't see what I'm
doing wrong. Any ideas?
-Thanks
appconfig.pl
#!/usr/bin/perl -w
use strict;
use AppConfig qwexpand);
my $cfgfile = '/home/fred/app.cfg';
my $config = AppConfig->new($cfgfile);
print $config->user();
/home/fred/app.cfg:
user = fred
home = /home/fred