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

Hello. Thanks for reply.

As i told below right now, my issue is to get my path. Because i can read and open my config.file. That is not a problem.

*****Lost in translation****TIMTOWTOI****
  • Comment on Re^4: Recover a path from a config file

Replies are listed 'Best First'.
Re^5: Recover a path from a config file
by GotToBTru (Prior) on Jun 06, 2016 at 18:46 UTC

    It makes the most sense to do more than open the config file. It makes the most sense to create the Perl object the contents of the config file is meant to represent. I've shown you how to do that without modifying the contents of your config file. The information you seek is now in Perl memory. You need to learn how to use hash references to access the particular elements of the config information. I suggest References quick reference as an excellent starting point. See also the following Excellent Hash Reference.

    Your latest update introduces a wrinkle - the contents of the licence tag could be a single item or a list. You will need to learn about the ref command which will tell you which of those scenarios your current config file contains.

    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

      Thanks for the links at first.

      Yes , you right, it makes more sense to go further.

      Indeed , i have to improve my Perl level. That's the object of my presence here. Concerning for example how to use perfectly Hash ref

      *****Lost in translation****TIMTOWTOI****