for (keys %iso8859){ $string=~s/$_/$iso8859{$_}/gi; } print $string;