Get the element from a hash

Filed under: Perl tips — vincent @ 15:02

I’ve tripped on this simple question:
Having a perl hash %h, and knowing that is has only one element, how to get to this element as easily / as efficiently as possible? Of course, we suppose here that you don’t know the key corresponding to this element…