sub f { my $aref1 = shift; my $aref2 = shift; print "$_\n" for @$aref1; ... }