Instead of sorting the keys, which is unnecessary work, you can use List::Util's minstr subroutine.
use List::Util 'minstr'; my $first_key = minstr(keys %in);
lodin
In reply to Re: First Value in hash (List::Util::minstr())
by lodin
in thread First Value in hash
by techie411
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |