in reply to Function name in a variable, can't recall the concept
It's not "Function name in variable", it's "Method name in variable", and a relevant reference to same is https://perldoc.perl.org/perlobj.html#Method-Call-Variationsmy $funcname = ( $someCondition ? 'foo' : 'bar' ); $someObject->$funcname($arg1, $arg2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Function name in a variable, can't recall the concept
by VinsWorldcom (Prior) on Apr 02, 2019 at 21:28 UTC |