Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Variable Scoping in Perl: the basics

by marcelpaulo (Novice)
on May 27, 2018 at 00:19 UTC ( #1215262=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    package Szyewicki;
    
    print "Here at work, 'Robert' is $Robert, but over at the pool hall, '
    +Robert' is $PoolHall::Robert\n";
    
  2. or download this
    Here at work, 'Robert' is the darts expert, but over at the pool hall,
    + 'Robert' is the darts expert
    
  3. or download this
    use strict;
    use warnings;
    ...
    
    our ($Robert);
    print "Here at work, 'Robert' is $Robert, but over at the pool hall, '
    +Robert' is $PoolHall::Robert\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2021-06-13 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (58 votes). Check out past polls.

    Notices?