On 4/3/02 12:49 PM, Jonathan Scott Duff wrote: > On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: >> Reading EX4 and seeing those "place-holder" variables made me wonder what >> happens when someone (probably Damian ;) wants to use more than 26 of them. >> Do the place-holder names scale up as if they're being automagically >> incremented? (e.g. ..., y, z, aa, ab, ...) > > As I understand it, those place holders could be anything. So he could > have written > > our %operator is private //= ( > '*' => { $^foo * $^bar }, > '/' => { $^foo / $^bar }, > '~' => { ($^foo + $^bar) / 2 }, > ); > > and it would work just as well.
So it's the order that they appear that determines their binding? How would something like this (Perl 5 code) be represented: sub reverse_minus { $_[1] - $_[0] } I would have guessed it'd be: { $^b - $^a } But if the place-holder names can be anything, I'm not sure how you could bind place-holders "out of order" with respect to the things that they alias. -John