sub print_h_byref { my $href = shift; while (my ($key, $value) = each %$href) { print " Key: $key,\t Value: $value\n"; } }