in reply to passing an array ref to subroutine and modifying its elements

Looking at the way you write your functions, you clearly have not started using strict yet.

Also why is it that you must modify the array in place? That is a design decision that I look at and wonder if there isn't a cleaner solution.

But if you absolutely must get an argument in by reference and want to have a clean calling syntax, then I would throw out the thought that perhaps you want to make them into objects? Then at least you can localize the accesses to the internal structure in a semi-sane manner...

  • Comment on Re (tilly) 1: passing an array ref to subroutine and modifying its elements