in reply to Re^2: Not Coder reference error - when i pass function by Refernce
in thread Not Coder reference error - when i pass function by Refernce

FYI,
There is an alternate syntax using the arrow operator when calling a reference to a sub, e.g.:
#$mul = ($x * $y * &$add_ref(10,1) * &$counter_ref()); $mul = ($x * $y * $add_ref->(10,1) * $counter_ref->());
  • Comment on Re^3: Not Coder reference error - when i pass function by Refernce
  • Download Code

Replies are listed 'Best First'.
Re^4: Not Coder reference error - when i pass function by Refernce
by stevieb (Canon) on Feb 26, 2017 at 21:36 UTC

    I find that the arrow operator way is much cleaner, and more consistent with using references of other types.