my $href = { FOO => 1, BAR => 2 }; my_sub( $href ); sub my_sub { my $href = shift; # do something with the hash ref... }