if I have a variable $name, how do I get the string after the $, that is, 'name' in this case?
That's a silly question. Suppose there was a magical function
that just did that. Suppose the magical function is called
mushroom. Then you would have:
my $name_of_var = mushroom $name;
print $name_of_var; # prints 'name'.
There would be no gain. You could as well have typed:
my $name_of_var = 'name';
after all, if you know which variable to get the name of,
you already have the name. It's like phoning someone to ask
his/her phone number.
Furthermore, what if the variable is $foo {bar} () -> [3], what should this magical function return?
Abigail