chrism01 has asked for the wisdom of the Perl Monks concerning the following question:
at the top of my progs.#!/usr/bin/perl -w use strict;
This code 'works' as in it prints out the string val & I do not get any warnings / errors about undeclared var $cfg::test_str, even though I think I should.#!/usr/bin/perl -w use strict; { package cfg; use strict; } $cfg::test_str = "cfg test"; print "$cfg::test_str\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Package declaration & use strict;
by Aristotle (Chancellor) on Jan 13, 2006 at 02:00 UTC | |
by chrism01 (Friar) on Jan 13, 2006 at 03:08 UTC | |
|
Re: Package declaration & use strict;
by davido (Cardinal) on Jan 13, 2006 at 05:42 UTC | |
by phaylon (Curate) on Jan 14, 2006 at 23:07 UTC | |
|
Re: Package declaration & use strict;
by dragonchild (Archbishop) on Jan 13, 2006 at 13:55 UTC | |
|
Re: Package declaration & use strict;
by TomDLux (Vicar) on Jan 13, 2006 at 18:43 UTC | |
|
Re: Package declaration & use strict;
by webengr (Pilgrim) on Jan 14, 2006 at 00:23 UTC | |
by chrism01 (Friar) on Jan 15, 2006 at 23:45 UTC |