in reply to using callback function
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);
|
|---|