you are quite correct in your assessment of the hardcoded array name code needing some re-factoring, for extensibility pursposes.
i'd only consider someone stupid-actually usually just lazy-if you point out to them such a design shortcoming, and they won't bother to fix or even bother to learn.
so you shouldn't be so harsh on yourself.
other monks have pointed to solutions and possible further refactoring. it just dawned on me that some of these solutions might be a little hard to wrap one's head around sometimes. the straightforward solution is to go from @aa, @bb, @cc to $arrays{aa}, $arrays{bb}, $arrays{cc} etc. thus merely adding a hash wrapper.
the hardest line to type correctly is: stty erase ^H