in reply to Calling a hash member
Spliting the statement into two is definitely the way to go.
my $method = $ThingsToDo{firstTask}; $project->$method();
The trick used to interpolate function call results into a string also works here, but like in string literals, it's poorly readable.
$project->${\$ThingsToDo{firstTask}}();
|
---|