标签: perl
在遍历keys %hash生成的列表时修改哈希是否安全?
keys %hash
my $blah; my %hash; for my $key (keys %hash) { # Some code that sets $blah.... delete $hash{$key} if $key=~/$blah/; }