http://www.perlmonks.org?node_id=550057


in reply to Value of a scalar specified by a second scalar

I know better ways...
OK, so you're not really after "how do I do this?", you want to be sure that "the answer" is that it's really stupid.

I invite you to read mjd's note on Why it's stupid to use a variable as a variable name.