in reply to Passing function to a function using \&<function name> method
Welcome to the Monastery!
Something along these lines:
timeout_func($timeout, \&myfunc, $arg1, $arg2); sub timeout_func { my ($timeout, $func, @args) = @_; # ... $func->(@args); }
HTH
FYI, that '\&<function name> mechanism' you're referring to is properly called a code reference (or 'coderef'). See perlref for more info.
|
|---|