... # populate your %project readItem(\%project); ... sub readItem { my ($project) = @_; my $sub_project = $project->{...}->{...}; etc. }