use Config::Properties::Simple; my $cfg = Config::Properties::Simple->new(file => '/my/file.cfg') or die "unable to open config file"; my $tree = $cfg->splitToTree;