foreach my $key (keys %convs) { $in =~ s/$convs{$key}/$key/g; }