Elizabeth, I have been looking for that one to sort operating system devices. Exceptional timing!
Thanks, Mark Devine (202) 878-1500 -----Original Message----- From: Elizabeth Mattijsen <l...@dijkmat.nl> Sent: Saturday, March 2, 2024 8:14 AM To: ToddAndMargo via perl6-users <perl6-us...@perl.org> Subject: Re: I need sorting help $ raku -e '.say for <afoo12 afoo2>.sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List) afoo2 afoo12 > On 2 Mar 2024, at 07:26, ToddAndMargo via perl6-users <perl6-us...@perl.org> > wrote: > > Hi All, > > @Sorted_List = @Sorted_List.sort: { .comb(/ \d+ | \D+ /) .map({ .Int // .self > })}; > > gives me > > Element [0] <D:\MyDocsBackup\backup1> > Element [1] <D:\MyDocsBackup\backup10> > Element [2] <D:\MyDocsBackup\backup2> > Element [3] <D:\MyDocsBackup\backup3> > Element [4] <D:\MyDocsBackup\backup4> > Element [5] <D:\MyDocsBackup\backup5> > Element [6] <D:\MyDocsBackup\backup6> > Element [7] <D:\MyDocsBackup\backup7> > Element [8] <D:\MyDocsBackup\backup8> > Element [9] <D:\MyDocsBackup\backup9> > > I need it to say > > Element [0] <D:\MyDocsBackup\backup1> > Element [1] <D:\MyDocsBackup\backup2> > Element [2] <D:\MyDocsBackup\backup3> > Element [3] <D:\MyDocsBackup\backup4> > Element [4] <D:\MyDocsBackup\backup5> > Element [5] <D:\MyDocsBackup\backup6> > Element [6] <D:\MyDocsBackup\backup7> > Element [7] <D:\MyDocsBackup\backup8> > Element [8] <D:\MyDocsBackup\backup9> > Element [9] <D:\MyDocsBackup\backup10> > > What did I goof up, this time? > > Many thanks, > -T