in reply to Re: Sort undef
in thread Sort undef
This being a simple case, I thought the typical way to do it would be in the form:
sort { (defined($a) <=> defined($b)) || ($a cmp $b) }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Sort undef
by LanX (Saint) on Jun 12, 2017 at 16:29 UTC |
In Section
Seekers of Perl Wisdom