in reply to Derive a variable name from a variable?

Don't write Perl code that computes variable names. It can be done (it is called symbolic references), but it is bad practice, it is frowned upon for several good reasons, and it is bad enough that it will trigger a warning.

Use a hash instead.

Update: Just as you can shoot a bullet into your own foot or put your cat into the microwave oven, but you should not do it.

  • Comment on Re: Derive a variable name from a variable?