use strict; sub test { my $test = $main::hash{foo}; print "$test\n"; } 1;