in reply to Passing a string to call an array?
What you are trying to do is called a symbolic reference and (1) it is forbidden under the use strict; pragma, and (2) it can't be done with lexical variables. And, in general, it should not be done either, using a hash or a hash of arrays as suggested above (or a hash of hashes, as the case may be) is almost always a much better idea.
|
|---|