{ my %private_hash; sub build_data { # do magical stuff on %private_hash } sub get_item { my $item = shift; if(exists($private_hash{$item})){ return $private_hash{$item}; } else{ return undef; } } } #### { sub one { # magical stuff here } sub two { # more magical stuff here } }