On 9/1/05, Yuval Kogman <[EMAIL PROTECTED]> wrote: > On Wed, Aug 31, 2005 at 13:43:57 -0600, Luke Palmer wrote: > > Uh yeah, I think that's what I was saying. To clarify: > > > > sub foo (&prefix:<+>) { 1 == 2 } # 1 and 2 in numeric context > > foo(&say); # nothing printed > > > > But: > > > > sub foo (&prefix:<+>) { +1 == +2 } > > foo(&say); # "1" and "2" printed > > > > Luke > > Furthermore, even if: > > sub &infix:<==> ($x, $y) { +$x == +$y } > sub foo (&prefix:<+>) { 1 == 2 } > > foo(&say); # nothing printed > > but if > > sub foo (&*prefix:<+>) { 1 == 2 } > > then what?
Um, you can't do that. You can't lexically bind a global; that's why it's global. You could do: sub foo (&plus) { temp &*prefix:<+> = + 1 == 2 } And then something would be printed... maybe, depending on the implementation of == (with your implementation above, it would). Luke