Something like
should give you what you need.my $lowest_value = $href->{ ( sort {$a <=> $b} keys %$href )[0] };
Hope that helps,
-- Foxcub
#include www.liquidfusion.org.uk
Update: Added {$a <=> $b} to the sort to ensure it performs a numeric sort over an ASCII sort - thanks to those who pointed that out.
In reply to Re: Get hash value with the lowest key
by Tanalis
in thread Get hash value with the lowest key
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |