sub print_functions { my $program=shift; # this is not needed if $program is # global, obviously my $functions=$program->{functions}; # and now you can just use $functions to access the data }