Hi,
I have a packet, in which i have declarated a hash %some_hash :
package some_package;
my %some_hash = ( key1 => val1, key2 => val2 );
within a function from this package I am calling an other function which is in other package
sub _function {
require the_other_package;
function_from_the_other_package();
}
function_from_the_other_package() need to use %some_hash, but I Don't want to pass it as a parametar to function_from_the_other_package(), because in the_other_package, I have a lot of functions which needs %some_hash. I want to make %some_hash as a global variable into package the_other_package. How can I do that ?
thakns, and I'am sorry for my gramatics errors
I have a packet, in which i have declarated a hash %some_hash :
package some_package;
my %some_hash = ( key1 => val1, key2 => val2 );
within a function from this package I am calling an other function which is in other package
sub _function {
require the_other_package;
function_from_the_other_package();
}
function_from_the_other_package() need to use %some_hash, but I Don't want to pass it as a parametar to function_from_the_other_package(), because in the_other_package, I have a lot of functions which needs %some_hash. I want to make %some_hash as a global variable into package the_other_package. How can I do that ?
thakns, and I'am sorry for my gramatics errors