kurt2439 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Guys,
I have a development version of a script which is 99% the same as the production script except for about 40 variables which are mostly paths and usernames and such. I was hoping to just have a line in the beginning of the code like:
require "/path/to/file/";
which would contain all my variables, and then I could extract them from the program and never have to worry about changing them again.
After doing some googling, it seems like this is better achieved when the file you are including contains subroutines instead of variables, but I just want my code to be cleaner and have less variables to change. What is the perl way of doing this?
Many thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Development version of a script?
by ELISHEVA (Prior) on Feb 07, 2011 at 23:02 UTC | |
by kurt2439 (Sexton) on Feb 07, 2011 at 23:28 UTC | |
by ELISHEVA (Prior) on Feb 07, 2011 at 23:56 UTC | |
by kurt2439 (Sexton) on Feb 08, 2011 at 02:03 UTC | |
|
Re: Development version of a script?
by CountZero (Bishop) on Feb 07, 2011 at 22:53 UTC | |
|
Re: Development version of a script?
by Anonymous Monk on Feb 08, 2011 at 00:40 UTC |