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

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 drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-23 19:50 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (240 votes), past polls