If I have a hash
my %h = ( secret => 1; );
and I know that is only is one key in the hash, but I don\'t know what it is called.
A list slice should do it
(keys %h)[0]
keys returns a list, so just extract the first element of that list.
keys