in reply to Using Scalar In Array Name?

The hash advice in How can I use a variable as a variable name? should apply to your case. You can create a hash-of -arrays structure: perldsc

Replies are listed 'Best First'.
Re^2: Using Scalar In Array Name?
by Jim (Curate) on Jan 20, 2014 at 00:48 UTC
Re^2: Using Scalar In Array Name?
by no_slogan (Deacon) on Jan 20, 2014 at 00:50 UTC
    True, but you really shouldn't use a variable as a variable name unless you're absolutely sure there isn't a better way. That way lies madness. Go with the hash-of-arrays idea instead.

    Update: D'oh, scooped by Jim.

        I don't think it makes the case strongly enough. I would have linked Dominus's take on this like you did, if I had known where to find it.