You simplify the second sort condition from using ?: to using ||:
# this: ($b->[7] eq '' ? 0 : $b->[7]) <=> ($a->[7] eq '' ? 0 : $a->[7] # to this: ($b->[7]||0) <=> ($a->[7]||0)
In reply to Re: Re: complex sort
by Anonymous Monk
in thread complex sort
by mkmcconn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |