http://qs321.pair.com?node_id=141761

jnmfl has asked for the wisdom of the Perl Monks concerning the following question: (data structures)

I have the name of a variable stored in $var. How can I make it so $data grabs the variable name? I tried this:
$data = $$var;
I put $$var with two $'s because one '$' for the variable, then right after that the '$var' places the variables name, I hope there's a way to do this, I'm just using bad syntax and I don't know what the procedure is called.

Originally posted as a Categorized Question.