my %foo = ('a' => 1); my_sub(\%foo); sub my_sub { my $foo_ref = shift; #Now I want to do something here to name %bar as pointing to %foo: #my %bar ????? $foo_ref; #such that print $bar{a}; #prints '1' #and if I were to $bar{b} = 2; }; print $foo{b}; #prints '2'