If I have a variable, $bar , which is equal to the string "foo" and $foo is equal to 0xdead , how can I get the value of $foo , then how do I have only a string for the variable name?
In fact, I want to make a kind of pointer to a global namespace or hash search in the global namespace.
Failed to complete the following:
perl -e 'my $foo=0xdead; my $bar ="foo"; print ${$bar}."\n";'
It prints only a new line.
perl
Ross rogers
source share