On Thu, 5 May 2005, David Wheeler wrote:

> > I can see how to ask for a binary (hence infix) operator, but how
> > do I ask
> > for a prefix or postfix operator specifically, which +<< and >>+ do?
> > Maybe there are Operator::Prefix, etc, roles defined so you can ask
> > for
> > them?
>
> Ask for them for what?

For negating all elements of an array:

     @negatives = - @positives;

> They should write them [metaoperators] only for infix operators.

The above example is in S03, so that is not an option.

> Because [] applies only to infix operators, as I understand it.

You understand it.  I understand it.  But how does the parser know the
difference between

    @x = -<< @y;

and

    @x = [+] @y;

or even

    @x -= @y;

which shows that the position of metaoperator is not the distinguishing
factor.


Reply via email to