my %HoA = ( foo => [ 'bar', 'baz' ], qux => [ 'thud', 'xyz' ], ); mysub(\%HoA); # pass a reference of the data structure sub mysub { my $hash_ref = shift; # or if you want to directly work with a hash # instead of a reference inside the sub you can use # my %HoA = %{ shift }; # Then you can do your stuff... }