sort { $list{$a} <=> $list{$b} || $list{$a} cmp $list{$b} } keys %list
or compacted...
print "<select name=m_v>\n", ( map {"\t<option name=\"$_\">$list{$_}\n" } sort { $list{$a} <=> $list{$b} || $list{$a} cmp $list{$b} } + keys %list ), '</select>';
In reply to Re: Sorting by the hash value
by shotgunefx
in thread Sorting by the hash value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |