perlfan99 has asked for the wisdom of the Perl Monks concerning the following question:
///// MyConst.pm //////////// package MyConst; use Readonly; Readonly::Scalar $const1 => 1; ///////// END ////////////
i got this error: "Global symbol "$const1" requires explicit package name at MyConst.pm line 4////// test.pl ///////// use MyConst; print $const1; ////////// END //////////
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to create a constant file and use it in other file
by pc88mxer (Vicar) on Jul 16, 2008 at 00:13 UTC | |
by perlfan99 (Sexton) on Jul 16, 2008 at 00:19 UTC | |
by pc88mxer (Vicar) on Jul 16, 2008 at 00:24 UTC | |
by perlfan99 (Sexton) on Jul 16, 2008 at 00:33 UTC | |
by sgifford (Prior) on Jul 16, 2008 at 02:36 UTC | |
by alexm (Chaplain) on Jul 17, 2008 at 01:51 UTC | |
by perlfan99 (Sexton) on Jul 16, 2008 at 00:23 UTC |