Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Help with passing through a package...

by wog (Curate)
on Jan 31, 2002 at 22:21 UTC ( #142529=note: print w/ replies, xml ) Need Help??


in reply to Help with passing through a package...

Variables declared with my are local to the block or file which they are declared within. To make a variable accessible from the outside, you can declare with use vars, our (5.6+ only), or just use its full name instead of declaring it (e.g. $X2PCONF::...). (Of course, you don't even need to declare it or use its full name if you don't use strict, but please don't do that.)


Comment on Re: Help with passing through a package...
Download Code
Re: Re: Help with passing through a package...
by basicdez (Pilgrim) on Jan 31, 2002 at 22:38 UTC
    I am using the full name, do you know why it is not passing through? I am very stumped with this one. I am trying to declare one table to use throughout a larger set of programs, it is not only about passing through one variable, this is merely the tip of the iceberg. please help me if you can.
      I meant use that using fullname in XPCONF2.pm (and not my or anything else) was one option; I wasn't (purposely) suggesting that you'd need to change what's in your main script. What you are doing now in the .pm file is referring to a seperate variable declared with my when you do the assignment.
        I really appreciate your help, but could you help me to understand what you are saying. Are you saying that I should use X2PCONF::Num_OF... in X2PCONF.pm? I am sorry I am quite confused on this one.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (15)
As of 2014-09-23 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (222 votes), past polls