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.
In reply to Re^5: Recover a path from a config file
by GotToBTru
in thread Recover a path from a config file
by Chaoui05
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |