modifyHash(\%my_hash); sub modifyHash { my $hash_ref = shift; # Do something to the hash $hash_ref->{'test'}=1; # no need for return, the original hash has been modified # the return value could be a success/failure flag }