[Israel.pm] require issue

Gaal Yahas gaal at forum2.org
Wed Feb 28 07:26:05 PST 2007


On Wed, Feb 28, 2007 at 04:52:11PM +0200, Levenglick Dov-RM07994 wrote:
> I knew all of this, however since I didn't declare the include file to
> contain a package I assumed that all variables would be brought into the
> main:: namespace.
> Why is this not the case? 

The included file's '%hash' is probably '%main::hash', but the one you
declared in the main file is not. Variables declared with my are not
members of a package, but of a lexical scope.

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list