in reply to Dynamic Variable Names?
Try using eval. I've done this with function names before. Your code will look like:
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.
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.
In Section
Seekers of Perl Wisdom