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.