http://www.perlmonks.org?node_id=935504

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

sub routine { my %hash; BEGIN { $hash{KEY} = "string"; } }
Note how the BEGIN treats %hash as if it were a file-scoped global. The keys that are set in %hash are still set when routine() starts and are retained between calls to routine().