in reply to Trouble working with Config::Simple

it does not work
That is not very descriptive. What exactly does not work?

Do you see no output file named ".kenesis" in your home directory? Neither do I when I run your script. But, if I change:

$cfg->write("~/.kenesis");

to:

$cfg->write("/home/toolic/.kenesis");

I do get a file named ".kenesis" in my home directory. Perhaps Config::Simple does not expand the tilde properly.