B
brad
I have a list of about 100 constants that I want to use in several
files.
I have made this list of constants into a file with extension .hpl as
in .h for perl. anyways, I can use do or require to include this
file, however, the constants are not avaliable to use as if i had
declared them in the calling perl file. To use these constants, I
have to use the eval() function to so i say
KEY_PRESS(KEY_1) normally where KEY_1 is a constant;
when defining KEY_1 in another file and and calling it in function
KEY_PRESS it looks like this:
KEY_PRESS(eval(KEY_1))
I do not want to have to use eval()
why is this happening. This is not the case for variables. This is
only happening for constants. Is there a better way to include other
files into my perl programs. I need to have a comment where the perl
program goes to the file i am calling executes and stores constants
and comes back to the calling file and resumes as normal, require and
do almost do this...
please help
files.
I have made this list of constants into a file with extension .hpl as
in .h for perl. anyways, I can use do or require to include this
file, however, the constants are not avaliable to use as if i had
declared them in the calling perl file. To use these constants, I
have to use the eval() function to so i say
KEY_PRESS(KEY_1) normally where KEY_1 is a constant;
when defining KEY_1 in another file and and calling it in function
KEY_PRESS it looks like this:
KEY_PRESS(eval(KEY_1))
I do not want to have to use eval()
why is this happening. This is not the case for variables. This is
only happening for constants. Is there a better way to include other
files into my perl programs. I need to have a comment where the perl
program goes to the file i am calling executes and stores constants
and comes back to the calling file and resumes as normal, require and
do almost do this...
please help