Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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 lurking in the Monastery: (11)
As of 2015-11-25 18:27 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (684 votes), past polls