in reply to Re: Can I determine if the value of a variable is the same as an arrays name?
in thread How can I use the value of a scalar as the name of an array variable?

The big problem with soft references is that they make things very difficult to debug, and if the user has any control of the variable name, they can cause all sorts of horrible things to happen. What if your program (by accident in your code, by design of somebody malicious, or by the seemingly innocuous mistake of a user) ended up trying to make changes to a variable named "/"? $/ has a certain meaning that can cause your script to behave strangely. All of the sudden your files aren't being read normally.

Try debugging THAT!

Generally most uses of variables with soft references can be done much more cleanly by using hashes.

  • Comment on Re: Answer: Can I determine if the value of a variable is the same as an arrays name?
  • Download Code