Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Better way to define global variables

by kcott (Abbot)
on Jul 25, 2013 at 14:36 UTC ( #1046360=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Utilities;
    
    ...
    our $UTIL_THAT = "util_that";
    
    1;
    
  2. or download this
    $ perl -Mstrict -Mwarnings -E '
        use Utilities;                     
    ...
    '
    Global symbol "$SYS_DIR" requires explicit package name at -e line 3.
    Execution of -e aborted due to compilation errors.
    
  3. or download this
    $ perl -Mstrict -Mwarnings -E '
        use Utilities qw{$SYS_DIR};        
        say $SYS_DIR;
    '
    sys_dir
    
  4. or download this
    $ perl -Mstrict -Mwarnings -E '
        use Utilities qw{:SYS};            
        say $SYS_DIR;
    '
    sys_dir
    
  5. or download this
    $ perl -Mstrict -Mwarnings -E '
        use Utilities qw{:UTIL $SYS_OTHER};
    ...
    '
    sys_other
    util_that
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046360]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2015-07-08 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls