develooper Front page | perl.perl6.users | Postings from June 2018

Re: need sort help

Thread Previous | Thread Next
From:
Andreas.Mueller
Date:
June 11, 2018 07:51
Subject:
Re: need sort help
Message ID:
13229_1528703482_5B1E29F6_13229_50_1_20180611071252.GA7941@biologie.uni-osnabrueck.de
  ls -t

  :-)

On 08.06.18 17:15, ToddAndMargo wrote:
> Hi All,
> 
> https://docs.perl6.org/routine/sort
> 
> How do I fix this?
> 
> $ ls | perl6 -e 'my @x=slurp(); say @x.sort'
> (log.06-08-2018_16:07:39.zip
> log.06-08-2018_17:07:39.zip
> log.07-08-2018_06:07:39.zip
> log.07-08-2018_16:07:39.zip
> log.12-08-2016_06:07:39.zip
> )
> 
> 
> 2016 should be at the top.
> 
> 
> Many thanks,
> -T

-- 
Andreas Müller - Raum: 35/114b - Tel: 2875

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