develooper Front page | perl.perl5.porters | Postings from July 2021

Re: Elevator pitch, deprecating $a/$b sort globals by using sub{}

Thread Previous | Thread Next
From:
Tony Cook
Date:
July 6, 2021 05:08
Subject:
Re: Elevator pitch, deprecating $a/$b sort globals by using sub{}
Message ID:
20210706050804.GA15367@venus.tony.develop-help.com
On Mon, Jul 05, 2021 at 03:32:46PM +0000, Oodler 577 via perl5-porters wrote:
> Of course, you could get the worst of all worlds by supporting *SQL:
> 
>   sort q{ORDER by $_->{a} DESC} @list; 
> 
> *incidentally, ORDER (at least in MySQL) is numerical,
> 
> https://stackoverflow.com/questions/3968135/mysql-alphabetical-order

No, MySQL sorts based on the type of the column (or value) involved,
which won't work for perl.

Every answer I see at that link is sorting alphabetically (some in
reverse.)

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About