You can always get at the first key and the first value of a hash by looking at the hash as a list:
my ($key,$value) = %hash;
If your hash has more than one key, you will get a key, but as a hash is not ordered, there is no guarantee that you will get a specific key.
In reply to Re: how to find a key from a hash
by Corion
in thread how to find a key from a hash
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |