in reply to naming a variable with the datum from another variable

There are two red flags here:

  1. Variable names that end in numbers - it is wrong almost every time when you have a variable name that ends in a number. Replace such variables by a single array.
  2. Using a variable as the name of a variable - TheDominus has said it much better than I ever will. In short, it just is a bad idea to do this. Replace the variable that you want to point to by a hash or an array.

Of course, it still is possible in Perl do use a variable to access a second variable by name, this is called a "soft reference", but unless you can tell us more about why you can't use an array or a hash as a solution instead, it is better for you to first learn about how to do that.

  • Comment on Re: naming a variable with the datum from another variable