in reply to Re^3: Recover a path from a config file
in thread Recover a path from a config file

Well, that's a start for sure. Since you still haven't provided an SSCCE, here's one:

#!/usr/bin/env perl use strict; use warnings; my $config = { programs => [ 'VIKTOR DESCRIPTION PRODUCT' => { name => 'VIKTOR ', parameters => [ Count_id => '06 (Viktor)', ] } ] }; print $config->{programs}->[1]->{name} . "\n";

IMHO that config file is a mess. Running it with a do or an eval is dangerous as others have mentioned and its structure is arcane at best. I hope for your sake that it's all some big XY problem and the actual task can be solved in an entirely different manner.

Replies are listed 'Best First'.
Re^5: Recover a path from a config file
by Chaoui05 (Scribe) on Jun 07, 2016 at 15:31 UTC

    ^^. Thanks it's perfect .

    It works . But i added this variable however :

    my %programs = @{ $config->{programs} };
    *****Lost in translation****TIMTOWTOI****