Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Better way to define global variables

by kcott (Archbishop)
on Jul 25, 2013 at 14:36 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1046360]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found