On 2020-05-24 15:51, Patrick R. Michaud wrote:
On Mon, May 25, 2020 at 12:07:22AM +0200, Tobias Boege wrote:
@things.sort: {
.comb(/ \d+ | \D+ /)
.map({ .Int // .self })
}
Or how about even somethig like
@things.sort: *.Version;
which does handle a reasonable set of
On Mon, May 25, 2020 at 12:07:22AM +0200, Tobias Boege wrote:
> @things.sort: {
> .comb(/ \d+ | \D+ /)
> .map({ .Int // .self })
> }
Or how about even somethig like
@things.sort: *.Version;
which does handle a reasonable set of version semantics...?
(The .Version method was
On 2020-05-24 15:39, ToddAndMargo via perl6-users wrote:
On 2020-05-24 15:07, Tobias Boege wrote:
On Sun, 24 May 2020, Elizabeth Mattijsen wrote:
Hmmm... it appears we need to numerify the match to get numeric
comparison semantics, so we put a "+" before the match:
$ raku -e 'my @x=.sort: {
On 2020-05-24 15:07, Tobias Boege wrote:
On Sun, 24 May 2020, Elizabeth Mattijsen wrote:
Hmmm... it appears we need to numerify the match to get numeric comparison semantics, so
we put a "+" before the match:
$ raku -e 'my @x=.sort: { +m/ \d+ $/ }; for @x { say $_; }'
a1
a2
a5
a123
a133
So
On Sun, 24 May 2020, Elizabeth Mattijsen wrote:
> Hmmm... it appears we need to numerify the match to get numeric comparison
> semantics, so we put a "+" before the match:
>
> $ raku -e 'my @x=.sort: { +m/ \d+ $/ }; for @x { say $_;
> }'
> a1
> a2
> a5
> a123
> a133
>
So I think this would be
Hmmm... it appears we need to numerify the match to get numeric comparison
semantics, so we put a "+" before the match:
$ raku -e 'my @x=.sort: { +m/ \d+ $/ }; for @x { say $_; }'
a1
a2
a5
a123
a133
> On 24 May 2020, at 21:49, ToddAndMargo via perl6-users
> wrote:
>
>
>>> On 24 May 2020,
On Sun, 24 May 2020, ToddAndMargo via perl6-users wrote:
> On 2020-05-24 02:24, Elizabeth Mattijsen wrote:
> > dd .sort: { m/ \d+ $/ }
> >
>
> Hi Elizabeth,
>
> This seems to work:
>
>$ raku -e 'dd .sort: { m/ \d+ $/ };'
>("a5", "a6", "a33", "a111").Seq
>
>
> But I can't figure out
On 24 May 2020, at 10:43, ToddAndMargo via perl6-users
wrote:
Hi All,
https://docs.raku.org/routine/sort
I need help sorting a list.
This is the list of values I want to sort:
H:\MyDocsBackup\backup1
H:\MyDocsBackup\backup2
H:\MyDocsBackup\backup126
H:\MyDocsBackup\backup3
dd .sort: { m/ \d+ $/ }
> On 24 May 2020, at 10:43, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> https://docs.raku.org/routine/sort
>
> I need help sorting a list.
>
> This is the list of values I want to sort:
>
> H:\MyDocsBackup\backup1
> H:\MyDocsBackup\backup2
>
Hi All,
https://docs.raku.org/routine/sort
I need help sorting a list.
This is the list of values I want to sort:
H:\MyDocsBackup\backup1
H:\MyDocsBackup\backup2
H:\MyDocsBackup\backup126
H:\MyDocsBackup\backup3
H:\MyDocsBackup\backup33
H:\MyDocsBackup\backup6
This is what I want back:
10 matches
Mail list logo