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

Re: Re: Scope Between global and my

by ctilmes (Priest)
on Apr 01, 2004 at 18:53 UTC ( #341748=note: print w/ replies, xml ) Need Help??

in reply to Re: Scope Between global and my
in thread Scope Between global and my

I would only use the package-global variable if other packages (or main) must have access.

In this case, just use a 'package' lexical:

package Foo; my $data; sub foo { ... } sub bar { ... } 1;

Comment on Re: Re: Scope Between global and my
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2016-02-09 08:01 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (309 votes), past polls