in reply to delete hash key/value in subroutine

Lawliet's method (copying the hash) is the only way I can think of meeting your requirements. However, if you'll settle for keeping the key while having its value undefined, you can avoid copying the hash.
my %hash = ('key1' => 'v1', 'key2' => 'v2'); del_hash_key(\%hash); sub del_hash_key { my $hash = shift; local $hash->{'key1'} = undef; # Until end of scope. print %$hash; # Prints the latter key/value pair print "\n"; } print %hash; # Prints both key/value pairs