
use vars qw/%CONFIG/;
use Config::Sofu "config.sofu";
if ($CONFIG{FOOBAR}) {
...
}
if ($CONFIG{Bar}->[7]->{Foo} eq "Foobar") {
...
}
Save the new configuration:
$CONFIG{FOOBAR}="Bar times Foo";
Config::Sofu::save;
or
Config::Sofu::save(%CompletlyNewConfig)

This class exports the hash %CONFIG by default which contains all the information of the file which is given to the use statement.

Save the new configuration of to the same file again

The comments in the sofu-file will only be saved again if Data::Sofu >= 0.2.3 is installed.

Data::Sofu,perl(1),http://sofu.sf.net