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:
Paul "LeoNerd" Evans
Date:
July 5, 2021 19:30
Subject:
Re: Elevator pitch, deprecating $a/$b sort globals by using sub{}
Message ID:
20210705202949.391bc5b7@shy.leonerd.org.uk
On Sun, 4 Jul 2021 17:02:00 +0000
Nicholas Clark <nick@ccl4.org> wrote:

> Our problem here is that sort needs two implicit arguments. *Is* it
> the only operator that wants >1 implicit argument?

`reduce`

as in eg.

  my $item = reduce { $a->{$b} } $href, @innerkeys;

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

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