gpt4 book ai didi

Perl:如何获取 key "keys on reference is experimental"上的 key

转载 作者:行者123 更新时间:2023-12-01 00:55:30 26 4
gpt4 key购买 nike

我正在寻找 Perl 警告的解决方案

“引用键是实验性的”

我从这样的代码中得到这个:

foreach my $f (keys($normal{$nuc}{$e})) {#x, y, and z

我在 StackOverflow 上发现了类似的东西:

Perl throws "keys on reference is experimental"

但我不知道如何在我的情况下应用它。

如何在不抛出此错误的情况下获取多个键控散列的键?

最佳答案

keys %{$normal{$nuc}{$e}}

例如。首先取消引用它。

如果你有一个引用开始,你不需要 {}例如。:
my $ref = $normal{$nuc}{$e};
print keys %$ref;

关于Perl:如何获取 key "keys on reference is experimental"上的 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37438158/

26 4 0
文章推荐: angularjs - 使用 ng-click 更改