Because said subroutine only exists in the namespace of your header file, your main program cannot access it. There are however a number of ways for your program to access this constant. Assuming header.pm contains your constants, and program.pl is your script
Program.pl can then use header; and just access camel as normal.package header; @ISA=('Exporter'); @EXPORT=('camel'); use constant camel => 'flea-ridden'; 1; # I'm a well-behaving module
# program.pl use header; *header::camel=*::camel; print &camel; # Note that you have to call camel as a function here.
CU
Robartes-
In reply to Re: Include Constants from other files
by robartes
in thread Include Constants from other files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |