Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: What to use instead of global variables

by Cody Fendant (Pilgrim)
on Mar 28, 2012 at 03:31 UTC ( #962062=note: print w/ replies, xml ) Need Help??


in reply to What to use instead of global variables

What this does, of course, is that Perl tells me that $global_variables 1-3 in the file lib.pl need an explicit package name and compilation fails.

It fails for me in a completely different way. Even if I use the Switch module. Which takes a scalar as an argument not a subroutine.

Which version of perl are you using?

But the answer to one of your questions is to use our instead of my.


Comment on Re: What to use instead of global variables
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (15)
As of 2015-07-30 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls