note that I had to change your double quotes to single quotes in the code ini file entry.# cat test.ini [path] root = C:\test code = $root . '\code1' # cat test.pl use Config::IniFiles; $ini = Config::IniFiles->new(-file => 'test.ini'); $root = $ini->val('path', 'root'); print "root = $root\n"; $code = $ini->val('path', 'code'); print "code = $code\n"; $code = eval $code; print "code = $code\n"; # perl test.pl root = C:\test code = $root . '\code1' code = C:\test\code1
In reply to Re: Config files
by mifflin
in thread Config files
by sparkel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |