freddo411 has asked for the wisdom of the Perl Monks concerning the following question:
However, strict is unhappy saying:use strict; *PIE = \"Warm Apple"; print "pie: $PIE\n";
Neglecting to use strict allows this to work.Variable "$PIE" is not imported at ./constant.pl line 7. Global symbol "$PIE" requires explicit package name at ./constant.pl l +ine 7. Execution of ./constant.pl aborted due to compilation errors.
Is there a way to declare constants that works under strict?
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to create a "CONSTANT"
by kelan (Deacon) on Jun 05, 2003 at 23:11 UTC | |
|
Re: How to create a "CONSTANT"
by sauoq (Abbot) on Jun 05, 2003 at 23:27 UTC | |
by Willard B. Trophy (Hermit) on Jun 07, 2003 at 15:22 UTC | |
by larsen (Parson) on Jun 07, 2003 at 15:50 UTC | |
by sauoq (Abbot) on Jun 07, 2003 at 19:00 UTC | |
|
Re: How to create a "CONSTANT"
by dpuu (Chaplain) on Jun 06, 2003 at 00:57 UTC | |
by freddo411 (Chaplain) on Jun 09, 2003 at 20:52 UTC | |
|
Re: How to create a "CONSTANT"
by perrin (Chancellor) on Jun 05, 2003 at 23:24 UTC | |
by sauoq (Abbot) on Jun 05, 2003 at 23:31 UTC | |
|
Re: How to create a "CONSTANT"
by nite_man (Deacon) on Jun 06, 2003 at 06:49 UTC |