I have a question relating to Perl dynamic code. Is there a construct in Perl where I could use to execute code.
For instance,
$command = " some command";
$perl -> execute($command);
$command
changes in run time . Sorry for my terminology. I do not know how to explain it otherwise.
I am trying to accomplish this: I have a function which execute some command for each reference in a array.
...insert example call to function...
Let's say each reference has an identifier associated.
...insert sample reference...
...say something about how you determine the identifier...
...say something about how you want to use the identifier...
I can't iterate through the array and execute for every reference since a portion of the command varies for each reference as it has a part of the identifier and there is no exhaustive list of identifiers. For instance if $r0
has an identifier 'r0', the command $r0->test("r0")
should be executed.