my %hash = ( foo => 'baz' ); print $hash{foo}.'\n'; myroutine( \%hash ); print $hash{foo}.'\n'; sub myroutine { my $hash_ref = shift; $$hash_ref{foo}='bar'; }