while (my ($key, $value) = each %datahash) { print {OUTFILE} "$key\t$value\n"; }