| ||||||
| 5/20 |
| 2004/3/17 [Computer/SW/Languages/Perl] UID:12736 Activity:nil |
3/17 In Perl, when I "use strict;", how do I declare a global array
or global hash? use vars qw (@ASSOC, %KEYHASH); doesn't work...
\_ At the start you can declare "my @array", and everything in that
scope or below will see it. --scotsman
\_ It should be:
use vars qw(@ASSOC %KEYHASH);
(no comma)
I believe in perl >= 5.6 you can say:
our (@ASSOC, %KEYHASH); --dbushong |