<p>I am writing a script which is likely to be modified by users. Currently I am storing the configuration settings inside the script. It exists in the form of a hash-of-hashes.</p>

<p>I would like to guard against people accidentally using lowercase characters in the hash keys, because that will break my script.</p>

<p>It would be simple to inspect the hash keys and merely issue warnings for any keys with lowercase characters, but I would rather fix the case sensitivity automatically.</p>

<p>In other words, I want to convert all the hash keys in the top-level hash to uppercase.</p>

Walk through the hash and replace any lowercase keys with their uppercase equivalents, and delete the old ones.  Roughly:
```
```
for my $key ( grep { uc($_) ne $_ } keys %hash ) {
    my $newkey = uc $key;
    $hash{$newkey} = delete $hash{$key};
}
```
```