in reply to Overloading operators: -> to .

I'm not sure that's possible in Perl5. Overloading += still leaves it as a binary operator and does not change its binding precedence, so the parser doesn't have to care; the only thing that changes is how the operation is performed. Changing method invocation syntax is something else again. If it's possible, it's surely much more involved. As you've probably guessed, simply defining sub . won't do it.

Now, it WILL be possible in Perl6, but OTOH you won't NEED to do it in Perl6 because Perl6 will come with the method invocation syntax you want out of the box. (When will Perl6 become available? I don't know, but it will be a joyous occasion.)


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/