Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 romping around the Monastery: (7)
As of 2014-07-28 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (192 votes), past polls