in reply to Re^3: Eval/package question
in thread Eval/package question
my variables are local to the lexical scope in which they are declared, and can not be accessed outside that scope.
If you want to access %items outside the file in which it is declared, you need to specify our %items, not my %items. Then you can access it by its fully-qualified name. That is, if it is declared in package Foo you say (e.g.) $Foo::items{Dent} = 'Arthur';.
In an ideal world the OP would not be mucking around with global variables, but this is not an ideal world.
|
---|