foreach (my ($key, $value) = each (%take_counts)) { print OUTPUT "$host\t$key\t$value\n"; }