use strict; use warnings; use Config::Properties; use Data::Dumper; my $file = 'test.cfg'; open my $fh, '<', $file or die "Unable to open $file ($!)"; my $properties = Config::Properties->new(); $properties->load($fh); my $config = $properties->splitToTree(qr/\./); close $fh; print Dumper($config);