Coping with Scoping

Visit Coping with Scoping

In the Beginning every part of your program had access to all the variables in every other part of the program. That turned out to be a problem, so language designers invented local variables, which were visible in only a small part of the program. This article discusses the difference between package variables and lexical variables. Topics include: global variables, lexical variables, local declaration, my declaration, my variable, package declaration, package qualifier, package variable, private variable, scope, use strict vars, and use vars.

  • Cost: Free

Resource Specification

Category:

Perl : Online Articles

Title / Program Name:

Coping with Scoping

URL:

http://perl.plover.com/FAQs/Namespaces.html

Cost:

Free

Author:

Mark-Jason Dominus

Keywords:

perl variable scope, perl local variables, perl package variables, perl strict vars, perl use vars, perl global variables, perl lexical variables, perl private variables, perl scope

Summary:

Perl namespace management and variable scope

Ratings Breakdown

Number of Votes:

10

Resource Rating:

7.89

Highest Rating:

10

Lowest Rating:

3

Bar Graph Chart
RatingVote %# of Votes
1010%1
930%3
840%4
710%1
60%0
50%0
40%0
310%1
20%0
10%0

Want to increase the number of votes and resource rating for this listing?

Place a Coping with Scoping Vote Box on your website.