Question: Ok so I have alot of variables in numeric order. Unfortunately they are not in an array. Now I need to do some work on each variable and was wondering what would be the smartest way to do so. I've read that using a variable in a variable name is dangerous, since it can cause complications. I was thinking of something like this below but would appreciate guidance :)

```
my $var10
my $var20
my $var30
...
my $var300

For (my $t = 10; $t < 301; $t++){$var$t ...}

```

EDIT: 
let's say I wanted to push these variable's into an array. How would I best proceed?

Answer: 
Refactor so that they *are* in an array.
Pull all your variables' values into a hash using

```
my %var;
{
  for (1 .. 30) {
    my $n = $_ * 10;
    $var{$n} = eval "\$var$n";
  }
}

```

then you can 

```
for (1 .. 30) {
  my $t = $_ * 10;
  $var{$t}...
}

```

or just

```
for my $t (sort { $a <=> $b } keys %var) {
  $var{$t}...
}

```

but *don't* do it again!