Changing keys in a “for ( keys %hash ) {}”-loop

后端 未结 5 450
终归单人心
终归单人心 2021-01-14 08:12

I remember something about not changing the keys in a

for my $key ( keys %hash ) { ...

for example

for my $key ( keys %hash         


        
5条回答
  •  悲&欢浪女
    2021-01-14 08:33

    But , if you want change key name .

    you can delete the keys from hash , then create the key with exist values as you want. this could be a one work around for this requirement

提交回复
热议问题