in reply to Re^6: $obj->method v.s. $obj->method()
in thread $obj->method v.s. $obj->method()

can you also try this:
my $method = "foo"; $obj->$method; $obj->$method @args;

Replies are listed 'Best First'.
Re^8: $obj->method v.s. $obj->method()
by AnomalousMonk (Archbishop) on May 09, 2009 at 20:31 UTC
    my $method = "foo"; $obj->$method; $obj->$method @args;
    On both 5.004_02 and 5.004_04:
    • $obj->$method; and $obj->$method @args; both fail to compile;
    • $obj->$method(); and $obj->$method(@args); both compile and execute as expected.
      Thanks! It's confirmed by your post :)