in reply to Re: Re: Accessing Other Globals?
in thread Accessing Other Globals?
Please note that using global arrays is a sign that you have no idea how to correctly program your design (if you even have one). This is especially true if you're doing OO programming.my $package = ref($foo); if ($package) { no strict 'refs'; @global_array = @{"$package::A_GLOBAL_ARRAY"}; }
If you want to work with "global arrays", look into using Exporter.
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re3: : Accessing Other Globals?
by Foo::Bar (Acolyte) on Dec 15, 2001 at 03:05 UTC | |
by dragonchild (Archbishop) on Dec 15, 2001 at 03:16 UTC | |
by chip (Curate) on Dec 15, 2001 at 08:10 UTC | |
by tilly (Archbishop) on Dec 15, 2001 at 20:59 UTC | |
by tilly (Archbishop) on Dec 15, 2001 at 20:54 UTC |