Berkeley CSUA MOTD:Entry 12736
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/10 [General] UID:1000 Activity:popular
7/10    

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