On Fri, Jul 11, 2008 at 03:27:26PM +0200, TSa wrote:
> >Note that we already have:
> >
> > my @s = sort { $^a <=> $^b }, @a;
> > my @s = @a.sort { $^a <=> $^b };
>
> Is that the adverbial block syntax? If not how
> would it look?
The adverbial block syntax would be:
@a.sort:{ $^a <=> $^b };
sort(@a) :{ $^a <=> $^b };
I'm not entirely certain if any of the following
examples with adverbial blocks would also work. I'm guessing
they do, but could use confirmation.
sort @a, :{ $^a <=> $^b };
sort @a :{ $^a <=> $^b };
sort :{ $^a <=> $^b }, @a;
@a.sort: :{ $^a <=> $^b };
Pm