You need to include the & when you take the reference (otherwise your calling h and then taking a reference to teh result):
j (\@ar, \@vr, \&h);
And for most ordinary uses you can drop the & when calling the function as above. To invoke the coderef I prefer to use ->:
$k->($i,$j);
In reply to Re: using callback function
by BrowserUk
in thread using callback function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |