El Saturday, 01 de October del 2016 a les 20:44, Moritz Lenz va escriure:
On 01.10.2016 19:57, mimosinnet wrote:
@opposite = @opposite.sort({@$^a[3]});
For the record, you can simplify this a bit:
@opposite = @opposite.sort(*[3]);
Waw! It works! Many thanks!
I am still puzzled by the aste
El Saturday, 01 de October del 2016 a les 20:44, Moritz Lenz va escriure:
On 01.10.2016 19:57, mimosinnet wrote:
@opposite = @opposite.sort({@$^a[3]});
For the record, you can simplify this a bit:
@opposite = @opposite.sort(*[3]);
Waw! It works! Many thanks!
I am still puzzled by the ast
Hi,
On 01.10.2016 19:57, mimosinnet wrote:
> I have been searching on how to sort multidimensional arrays. The
> following code works and sorts the fourth column of the array:
>
> ---
> #!/usr/bin/env perl6
> # sort multidimensional array
>
> my @opposite = (
> <8976 ABD AB11 6LX NJ >,
>
On Sat, Oct 01, 2016 at 07:57:34PM +0200, mimosinnet wrote:
: @opposite = @opposite.sort({@$^a[3]});
I'd probably write that as:
@opposite .= sort: { $^a[3] }
or maybe just
@opposite .= sort( *[3] );
Larry
I have been searching on how to sort multidimensional arrays. The
following code works and sorts the fourth column of the array:
---
#!/usr/bin/env perl6
# sort multidimensional array
my @opposite = (
<8976 ABD AB11 6LX NJ >,
<8860 PLN AB12 4JS NO >,
<8905 DYC AB21 7EQ