See the keys
function manpage:
The returned values are copies of the original keys in the hash, so modifying them will not affect the original hash. Compare "values".
You can delete or change hash elements by subscripting, e.g.
delete $hash{$key};
$hash{$key} = "foo";