in reply to Re: For the life of me, i can't figure out this "use strict" variable problem
in thread For the life of me, i can't figure out this "use strict" variable problem
I tried the unless statement wrapped around the $cfg line, and that gave me an error.. In the above I wrapped my unless around the %Config line, that also gave the same error.. I guess neither is returning false when it craps out. Any idea how I can get it to die and print my message instead of the message in the module... this is the error message I get when running this code.#!/usr/local/bin/perl -w use strict; use Config::Simple; my $config_file = shift; if (!$config_file) { $config_file = "etc/allweb-backup.conf"; } my $cfg = new Config::Simple($config_file); my (%Config); unless (%Config = $cfg->vars()) { die "CRITICAL: $config_file is not a valid INI file!\n"; }
Something went wrong. No supported configuration file syntax found at +/usr/local/lib/perl5/site_perl/5.8.2/Config/Simple.pm line 184, <FH> +line 16.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: For the life of me, i can't figure out this "use strict" variable problem
by Golo (Friar) on Oct 24, 2004 at 21:19 UTC | |
by dcasey (Novice) on Oct 24, 2004 at 21:29 UTC | |
by Golo (Friar) on Oct 24, 2004 at 21:43 UTC | |
by Arunbear (Prior) on Oct 25, 2004 at 08:40 UTC | |
|
Re^3: For the life of me, i can't figure out this "use strict" variable problem
by Arunbear (Prior) on Oct 24, 2004 at 21:19 UTC | |
|
Re^3: For the life of me, i can't figure out this "use strict" variable problem
by Nkuvu (Priest) on Oct 25, 2004 at 11:13 UTC | |
|
Re^3: For the life of me, i can't figure out this "use strict" variable problem
by revdiablo (Prior) on Oct 25, 2004 at 19:22 UTC |