use Config::General; my %CONF = Config::General->new ('path/to/LED.cfg')->getall (); my $pwd = `(ApID=$CONF{ApID} $path/CA.sh)`;