in reply to Re: Global variables in Perl
in thread Global variables in Perl
Thanks, ikegami! I guess the issue is with my installation of Perl. If I use DEBUG, it croaks at the use of a bareword when strict 'subs' is in use. I had tried 'use constant', before, it kept warning me that the subroutine DEBUG was re-defined somewhere, now the warning went away. But the idea of using a sub instead of a variable is indeed neat, as Ronald pointed out. I tried &DEBUG but it looks for main::DEBUG. I'll probably just declare $DEBUG lexically in all scripts and modules and assign the function stored in ConfigThisJunk.pm to that variable. Later, I'll switch to a Mac... Cheers!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Global variables in Perl
by ikegami (Patriarch) on Jun 04, 2010 at 17:43 UTC | |
by taioba (Acolyte) on Jun 04, 2010 at 20:11 UTC | |
by ikegami (Patriarch) on Jun 04, 2010 at 20:18 UTC | |
by taioba (Acolyte) on Jun 04, 2010 at 21:46 UTC | |
by ikegami (Patriarch) on Jun 04, 2010 at 21:51 UTC | |
|