First of all, thanks for the responses. Sorry for the confusion though.. I just want to know what does a config file do within a Perl script. I know this is something that a programmer can edit without creating any problem on the actual script? The reason I provided the simple factorial program is for me to know how to link a config file there. Yes Kevin, i think I need an actual config file for that simple script. Later on, I can do it myself once I got familiar on how the config file works against it.
Thanks Guys.
Monster
You are correct! A config file is a place to put values that may or do change. That way, you can change them at will without having to change the script. The more complex your script is, the less you really want to edit it.
The format of the config file is up to you but there are modules (as Kevin pointed out) to process them. One module that we use where I work is called "Config::Scoped". Its a rather complex module, but the possibilities with it will amaze you. Personally, if you are just beginning with config files, the modules Kevin mentioned would be better. Or, if you wish, you can process them yourself, as I have done many times.
Regards,
Jeff