#!/usr/bin/perl -w use strict; my %horoscopes = ( 'homer' => 'pisces', 'marge' => 'sagitarius', 'bart' => 'cancer', 'libra' => 'libra' ); capitalize(\%horoscopes); sub capitalize { my $hash = shift; for my $key (keys %{$hash}) { $hash->{uc $key} = $hash->{$key}; delete $hash->{$key}; } }