in reply to Passing arguments to callback routines with named references
It's pretty simple actually. You cannot store a coderef with arguments. You can create a sub that will call the coderef with the appropriate arguments. Case 2 and Case 3 actually execute the coderef and stores the results. I came across this some time ago with a rather dumb attempt as such:
$blahref = \&blah(1);
This would actually execute blah and reference the return value of blah(1). Hope this helps.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
|
|---|