alih110 has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I have an object oriented perl script with a top level script and a lot of perl packages. I need to declare a global variable and use it in the top level script and in one of the perl package. I tried declaring the variable with "our $variable_name" but it is not working for me. It gives the following error =>
Any idea how to declare and use the global variables in perl?"Global symbol "$make_AR_1" requires explicit package name at ....."
I tried declaring the global variable in the top level script as well as in the perl package.
Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to declare and use global variables
by almut (Canon) on Nov 03, 2008 at 14:06 UTC | |
by JavaFan (Canon) on Nov 03, 2008 at 15:00 UTC | |
by almut (Canon) on Nov 03, 2008 at 15:07 UTC | |
Re: How to declare and use global variables
by JavaFan (Canon) on Nov 03, 2008 at 12:57 UTC | |
|
Back to
Seekers of Perl Wisdom