Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Our, use vars, and magic, oh my!

by chipmunk (Parson)
on Aug 23, 2001 at 21:20 UTC ( [id://107413]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl -l
    
    package Pkg;
    ...
                           # error with strict
    
    print $Pkg::var;       # 7
    
  2. or download this
    #!perl -l
    
    package Pkg;
    ...
                           # error with strict
    
    print $Pkg::var;       # undef; $Pkg::var has not been set
    
  3. or download this
    #!perl -l
    
    package Pkg;
    ...
                           # error with strict
    
    print $Pkg::var;       # 7
    
  4. or download this
    #!perl -l
    
    package Pkg;
    ...
                           # in this lexical scope
    
    print $Pkg::var;       # 7
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-18 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found