in reply to Include Constants from other files

If you define module with constants you should use Exporter to export them into the namespace of your script. For example:

package MyConstants; use base qw(Exporter); our @EXPORT = qw(CONST1 CONST2); use constant CONST1 => 12356; use constant CONST2 => 'xxx'; 1;

In this example all constants are exported by default but you may want to make it optional. See Exporter documentation for details.

Simple script which uses these constants:

use MyConstants; use strict; use warnings; print CONST1;

All I get is bare words.

What leads me to idea that you should use strict and warnings. It would catch this as error.

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org