#!/usr/bin/perl use strict; use AppConfig qw(:expand); use Data::Dump 'pp'; my $config = AppConfig->new({ CASE => 1, GLOBAL => {EXPAND => EXPAND_ALL} }); $config->define("VAR=s"); $config->define("AMB=s"); $config->define("DIRSKE=s"); $config->define("SCRIPT=s"); open my $fh,'<','./file.conf' or die "$!"; my $file = do{ local $/; <$fh> }; $file =~ s/[{}]//g; close $fh; open FH,'<',\$file; $config->file(\*FH); pp $config->{'FILE'}{'STATE'}{'VARIABLE'};;