develooper Front page | perl.perl5.porters | Postings from April 2022

Define behavior of sort in scalar context.

Thread Next
From:
Ovid via perl5-porters
Date:
April 3, 2022 21:21
Subject:
Define behavior of sort in scalar context.
Message ID:
582320011.718982.1649020863806@mail.yahoo.com
In the latest perlfunc.pod for `sort`:
    In list context, this sorts the LIST and returns the sorted list value.    In scalar context, the behaviour of L<C<sort>|/sort SUBNAME LIST> is    undefined.
This has been an open issue for almost a decade: https://github.com/perl/perl5/issues/12803. The conversation went on for a while, Yves produced a patch, the patch couldn't be applied because 5.18 was going to be released, and then there were a bunch more comments. It would be nice if behavior which can be defined actually gets defined.
Best,Ovid-- IT consulting, training, specializing in Perl, databases, and agile developmenthttp://www.allaroundtheworld.fr/. 
Buy my book! - http://bit.ly/beginning_perl
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