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;
In reply to Re: Re: Re: sort hash by value
by ant9000
in thread sort hash by value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |