whatever(\%list,$val); ... sub whatever { my %hash = %{$_[0]}; # my $hash_ref = $_[0]; my $val = $_[1]; ... }