sub someThingElse { my $data=shift; # then you can use %{$data} and @{$data->{$KEY}} }