You can use this in your code like this:sub by_blanklast { if (!length($a->[0]) ^ !length($b->[0])) { return length($b->[0]) - length($a->[0]); } return $a->[0] cmp $b->[0]; }
} sort by_blanklast map {In my testing, this seems to work like you want.
In reply to Re: Sort Empty String Last
by tadman
in thread sort empty string
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |