sub subby(&\@\@) { my ($coderef, $listA, $listB) = @_; my @result; .. logic .. @result; }