in reply to variables across modules

Try using our to declare your variables. My only allows access within the scope of Test.pl.

Test.pl
use strict; use test_module; our %hash = ( foo => 'bar', bar => 'foo' ); &test;

test_module.pm
use strict; sub test { print $main::hash{foo} . "\n"; }