hi peoples,
Lets say i had the following hash:
%test = (
1 => belgium
5 => brazil
8 => france
)
Is there a way to sort those elements and grab the value(in this case country) of the lowest numeral key ? Basically , since 1 is the lowest number, i want it's value , which is belgium. I've been able to sort them, but i have no idea how to sort, then grab just the value. Thanks
Lets say i had the following hash:
%test = (
1 => belgium
5 => brazil
8 => france
)
Is there a way to sort those elements and grab the value(in this case country) of the lowest numeral key ? Basically , since 1 is the lowest number, i want it's value , which is belgium. I've been able to sort them, but i have no idea how to sort, then grab just the value. Thanks