I used to know how to do this, but now I've completely forgotten. How do you "create" a variable name out of another variable?
I've created some hashes named %onehdr, %twohdr, %threehdr. I have a variable called $dynamic that can be "one", "two", or "three". Now, how do I go about dynamically referring to the hashes?
I've tried something like this:
... but that doesn't work AT ALL. Any ideas?
I've created some hashes named %onehdr, %twohdr, %threehdr. I have a variable called $dynamic that can be "one", "two", or "three". Now, how do I go about dynamically referring to the hashes?
I've tried something like this:
code:<HR>Code:${$dynamic}hdr{'foo'}
... but that doesn't work AT ALL. Any ideas?