First, you're not passing indexes, you're passing reference to the indexes. That's surely a bug.
Secondly, apples and oranges. If you need the indexes, why aren't you passing them using "method 1"? If you don't need the indexes, why are you passing them using "method 2"?
In reply to Re: Pass an array reference or array indices to a subroutine?
by ikegami
in thread Pass an array reference or array indices to a subroutine?
by umasuresh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |