becomes:for my $eng (keys %hash){ $hash{$hash_tr_fr{$eng}}=$hash{$eng}; delete $hash{$eng}; }
Update: corrected missing @, thanks SuicideJunkiemy @temp = keys %hash; @hash{@hash_tr_fr{@temp}} = delete @hash{@temp};
In reply to Re^3: how can i replace a hash key with other hash value?
by cdarke
in thread how can i replace a hash key with other hash value?
by satzbu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |