in reply to Re: Calling a subroutine when part of call is a variable Contant
in thread Calling a subroutine when part of call is a variable Contant

> Note the 
    $coderef->($obj, $method, $n++); 
syntax for the code reference method call.

Side note:

    $obj->$coderef($method, $n++);

Should do, too. :) 

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^3: Calling a subroutine when part of call is a variable Contant
by AnomalousMonk (Archbishop) on May 27, 2017 at 15:17 UTC
    Should do ...

    Aha! And indeed it does! (Somehow, I thought the roundabout syntax was necessary...)


    Give a man a fish:  <%-{-{-{-<