In Perl, if a variable holds the name for another variable, how do I use the first variable to visit the other one?
For example, let
$name = \"bob\";
See perldoc -q "variable name":
Beginners often think they want to have a variable contain the name of a variable. ...
Short answer: Don't. Long answer: Read the FAQ entry (which is also available on your computer). Longer answer: Read MJD's Why it's stupid to "use a variable as a variable name" (Part 2, Part 3).