in reply to Re: Re: sort hash by value
in thread sort hash by value
where fmt is defined as above (with the correction in split below, sure!). You can also use cmp instead of <=>, if you wish.@sorted_keys=sort { fmt($hash{$a}->{oid}) <=> fmt($hash{$b}->{oid}) } keys %hash;
|
|---|