Use separate comparisons. That way you can control numeric vs. string comparisons.
@paths = sort { $MyInteger{$b} <=> $MyInteger{$a} || $MyString{$a} cmp $MyString{$b} } keys %MyKeys;
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
In reply to Re: sorting with number then string
by pfaut
in thread sorting with number then string
by Gerryjun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |