in reply to Re: Trouble working with Config::Simple
in thread Trouble working with Config::Simple

Running this code:
#!/usr/bin/perl use strict; use warnings; use Config::Simple; our $cfg; my @player; my $completed_quests = "zero"; my $special_item = "zero"; my @enemy; my $class = "zero"; $cfg = new Config::Simple(syntax=>'simple'); $cfg->autosave(1); $cfg->param("player", "@player"); $cfg->param("quest", "$completed_quests"); $cfg->param("items", "$special_item"); $cfg->param("enemy", "@enemy"); $cfg->param("class", "$class"); $cfg->write("$ENV{HOME}/.kenesis");

outside of my game works but when using it inside the game it doesn't. Maybe it is the way I have it running, right now I have the code for Config::Simple spread out in my main program, but in this test one they are all grouped together variables are created and given a value then everything is written to the file.