http://qs1969.pair.com?node_id=184452


in reply to Dynamic Variable Names?

Try using eval. I've done this with function names before. Your code will look like:
I'm trying to do something like this: my @fee; for (my $i=0; $i < $MAX_ROWS; $i++){ my $eval_str = "push @fee, \$foo_$i"; eval($eval_str); }#end loop

Here I create the command I want to execute as a string and then evaluate it with eval.
UPDATE: I just saw dragonchild's comments and realized that my method probably wouldn't be safe for web applications. The eval would be dangerous, so use at your own risk.