sub foo{ my $hr if 0; BEGIN{ $hr = {foo => 23} } print $hr->{foo},"\n"; }; defined $hr and die "$hr is defined outside of scope"; foo(); # yes indeedy-doo, prints "23\n" -- practical solutions to systemic problems