in reply to First Value in hash

keys %in; #reset the iterator to the beginning of the hash my $firstkey = each %in; print MAIL "\t", $firstkey, " = \t", $in{$firstkey}, "\n";
but since hashes are not ordered (unless tied to some class that enforces some ordering), which key is "first" isn't very meaningful.

If you meant the key that sort makes be first,

my $firstkey = (sort(keys %in))[0];
is one way.