我有一个关于 Perl 动态代码的问题。Perl 中是否有可以用来执行代码的构造。
例如,
$command = " some command";
$perl -> execute($command);
$command
运行时间的变化。对不起我的术语。我不知道如何解释它。
我正在尝试做到这一点:我有一个函数可以为数组中的每个引用执行一些命令。
...insert example call to function...
假设每个引用都有一个关联的标识符。
...insert sample reference...
...say something about how you determine the identifier...
...say something about how you want to use the identifier...
我无法遍历数组并为每个引用执行,因为命令的一部分因每个引用而异,因为它具有标识符的一部分并且没有详尽的标识符列表。例如,如果$r0
具有标识符“r0”,$r0->test("r0")
则应执行该命令。