&loop_print(\%c); sub loop_print { my $href = shift; foreach (keys %{$href}) { print "$_: ${$href}{$_}\n"; } }