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

Thanks for feedback

  • Comment on Re^2: Not Coder reference error - when i pass function by Refernce

Replies are listed 'Best First'.
Re^3: Not Coder reference error - when i pass function by Refernce
by Marshall (Canon) on Feb 26, 2017 at 21:09 UTC
    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->());

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