Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks,
I am trying to include my constants which are placed in a separate file. There are quite a number of these constants defined as shown below : use constant IP_ADDR = '192.345.786.897'; # as an example Coming from a C/C++ background where these constants are kept in a header file and included at compile time and not at run time. All I get is bare words. It works fine if it is in the same file but not in a separate one. I tried creating a module with no success for handling purely constants. Would appreciate any help. Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Include Constants from other files
by chromatic (Archbishop) on Nov 13, 2002 at 07:32 UTC | |
Re: Include Constants from other files
by Chmrr (Vicar) on Nov 13, 2002 at 07:31 UTC | |
Re: Include Constants from other files
by IlyaM (Parson) on Nov 13, 2002 at 07:46 UTC | |
Re: Include Constants from other files
by robartes (Priest) on Nov 13, 2002 at 07:49 UTC | |
by gregor-e (Beadle) on Dec 01, 2002 at 04:11 UTC |
Back to
Seekers of Perl Wisdom