in reply to Re^4: How do I initiate a constant with variable value?
in thread How do I initiate a constant with variable value?

If you're worrying about whether loading a module costs time, then you're looking at the wrong locations:

  1. If your program runs a long time, then loading a module has a neglibile portion of the cost and optimizing that away gains you little opposed to the overall runtime of the program.
  2. If your program runs a short time but very often, then you should look at how to make your program run a longer time and process multiple requests. This will save you the loading and initialization time.
  3. If you're still worrying about the time that loading an external file might take, then Perl is the wrong approach.
  • Comment on Re^5: How do I initiate a constant with variable value?