http://www.perlmonks.org?node_id=405486


in reply to Re^2: How to pass two lists to a sub?
in thread How to pass two lists to a sub?

Personal coding preferences aside, I did consider something along the lines you have here but decided against it for two reasons.

  1. YAFZ asked specifically for arrays: "All I need is a simple construct in which I'll have two correct @l1 and @l2 at the end."
  2. Some benchmarking I carried a few months ago indicated that evaluating $array[$i] was faster than evaluating $arrayref->[$i]. (As one might expect given the additional dereference operation.)

(Minor point: You have $arrayref->[i] in a number of places.)

Regards,

PN5