in reply to First Value in hash

TIMTOWTDI, but perhaps:

my $key = ( sort keys %in )[0];