|No such thing as a small change|
Re: conf file in Perl syntaxby LanX (Bishop)
|on Jun 11, 2009 at 11:03 UTC||Need Help??|
If you are new to perl probably you don't want starting installing modules...
There is a poor man's solution for evaluating configfiles as scripts with do
this works with your example:
or even more error proved described in the docs with
BE AWARE: do searches the @INC directories, so better use a path to avoid problems...
UPDATE: As I wrote the config-file is evaluated as script not parsed as data, so be aware of necessities of securing this code! If it's just a one way script, and you have full control it's ok. If you mean to write a full scale program for others, better use a config-module.