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

Re^2: OUR declaration

by ioannis (Priest)
on Sep 23, 2006 at 10:19 UTC ( #574498=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my  $foo  = 1;
    our $foo = 2;
    print $foo  ; # prints 2
    
  2. or download this
    our $foo  = 2;
    my  $foo  = 1;
    print $foo  ; # prints 1
    
  3. or download this
    no warnings;
    
    ...
    package Bar;
    no strict;
    print 'Bar: '. $foo, "\n";   # $foo is undefined
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-12-20 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls