Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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.)

Replies are listed 'Best First'.
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 (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 I am sorry I am quite confused on this one.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2016-10-25 05:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.