> From: "Me" <[EMAIL PROTECTED]> > Date: Mon, 9 Dec 2002 17:12:13 -0600 > > First, I don't think it's necessary to allow > a variable (or variables) to be anywhere other > than the front of a chain. > > @var = [var|code] >> code >> code;
Agreed. > Second, it would be nice to allow a pipeline > element to pass the LHS, and invoke the RHS, > in one of two ways: iterated or not. If this > were to be done implicitly, perl (and humans) > would have to parse the whole pipeline from > the right to left, defeating the point of a > l2r pipeline syntax in the first place. So, > iteration would need to be invoked explicitly. > Perhaps something like: > > @var = for @source >> /foo/ >> sort; There is: vectorize it. The result is surprisingly ugly: @var = @source ≫>>≪ reverse >> sort; (The regex case wouldn't work under I<my> idea of this operator, as it's not a function). C<map> comes to the rescue: @var = @source >> map { reverse } >> sort; Luke