sub print_hash { my $hash_ref = shift; my $value; foreach $key (keys %$hash_ref) { $value = $hash_ref->{$key}; print "fruit: $key is $value\n\n"; } }