myfoo(\%hash1); myfoo2(%hash2); sub myfoo { my $ref = shift; my %hash = %{ $ref }; #longwinded i know } sub myfoo2 { my %flibble = @_; }